Fix weapon not updating after swapping to a weapon of the same type

This commit is contained in:
timokoesters 2020-03-19 20:57:36 +01:00
parent 26674390ab
commit 1e1ce2adbf

View File

@ -23,7 +23,7 @@ enum FigureKey {
#[derive(PartialEq, Eq, Hash, Clone)]
struct CharacterCacheKey {
state: Option<Discriminant<CharacterState>>, // TODO: Can this be simplified?
active_tool: Option<Discriminant<ToolKind>>,
active_tool: Option<ToolKind>,
shoulder: Option<Item>,
chest: Option<Item>,
belt: Option<Item>,
@ -39,7 +39,7 @@ impl CharacterCacheKey {
active_tool: if let Some(ItemKind::Tool(tool)) =
loadout.active_item.as_ref().map(|i| &i.item.kind)
{
Some(discriminant(&tool.kind))
Some(tool.kind)
} else {
None
},