mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix 1h second item cache issue #661
This commit is contained in:
parent
d63da1beb9
commit
6014bd8364
@ -32,6 +32,7 @@ enum FigureKey {
|
|||||||
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<ToolKind>,
|
active_tool: Option<ToolKind>,
|
||||||
|
second_tool: Option<ToolKind>,
|
||||||
shoulder: Option<Item>,
|
shoulder: Option<Item>,
|
||||||
chest: Option<Item>,
|
chest: Option<Item>,
|
||||||
belt: Option<Item>,
|
belt: Option<Item>,
|
||||||
@ -53,6 +54,13 @@ impl CharacterCacheKey {
|
|||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
|
second_tool: if let Some(ItemKind::Tool(tool)) =
|
||||||
|
loadout.second_item.as_ref().map(|i| &i.item.kind)
|
||||||
|
{
|
||||||
|
Some(tool.kind)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
},
|
||||||
shoulder: loadout.shoulder.clone(),
|
shoulder: loadout.shoulder.clone(),
|
||||||
chest: loadout.chest.clone(),
|
chest: loadout.chest.clone(),
|
||||||
belt: loadout.belt.clone(),
|
belt: loadout.belt.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user