mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix weapon not updating after swapping to a weapon of the same type
This commit is contained in:
parent
26674390ab
commit
1e1ce2adbf
@ -23,7 +23,7 @@ enum FigureKey {
|
|||||||
#[derive(PartialEq, Eq, Hash, Clone)]
|
#[derive(PartialEq, Eq, Hash, Clone)]
|
||||||
struct CharacterCacheKey {
|
struct CharacterCacheKey {
|
||||||
state: Option<Discriminant<CharacterState>>, // TODO: Can this be simplified?
|
state: Option<Discriminant<CharacterState>>, // TODO: Can this be simplified?
|
||||||
active_tool: Option<Discriminant<ToolKind>>,
|
active_tool: Option<ToolKind>,
|
||||||
shoulder: Option<Item>,
|
shoulder: Option<Item>,
|
||||||
chest: Option<Item>,
|
chest: Option<Item>,
|
||||||
belt: Option<Item>,
|
belt: Option<Item>,
|
||||||
@ -39,7 +39,7 @@ impl CharacterCacheKey {
|
|||||||
active_tool: if let Some(ItemKind::Tool(tool)) =
|
active_tool: if let Some(ItemKind::Tool(tool)) =
|
||||||
loadout.active_item.as_ref().map(|i| &i.item.kind)
|
loadout.active_item.as_ref().map(|i| &i.item.kind)
|
||||||
{
|
{
|
||||||
Some(discriminant(&tool.kind))
|
Some(tool.kind)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user