mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix agent-less pets
This commit is contained in:
parent
f4e04ecefc
commit
38d2ba5d84
@ -49,7 +49,10 @@ fn tame_pet_internal(ecs: &specs::World, pet_entity: Entity, owner: Entity, pet:
|
|||||||
.write_storage()
|
.write_storage()
|
||||||
.insert(pet_entity, pet.unwrap_or_default());
|
.insert(pet_entity, pet.unwrap_or_default());
|
||||||
|
|
||||||
if let Some(agent) = ecs.write_storage::<Agent>().get_mut(pet_entity) {
|
if let Some(agent) = ecs
|
||||||
|
.write_storage::<Agent>()
|
||||||
|
.get_mut_or_default(pet_entity)
|
||||||
|
{
|
||||||
agent.set_no_flee();
|
agent.set_no_flee();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user