Merge branch 'maxicarlos08/fix-pet-follow' into 'master'

Fix pets not following after making them stay

See merge request veloren/veloren!4081
This commit is contained in:
Joshua Barretto 2023-08-17 10:48:31 +00:00
commit c9da8fb6a4
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ gameinput-climbdown = Climb Down
gameinput-wallleap = Wall Leap
gameinput-togglelantern = Toggle Lantern
gameinput-mount = Mount
gameinput-stay = Stay/Follow
gameinput-stayfollow = Stay/Follow
gameinput-chat = Chat
gameinput-command = Command
gameinput-escape = Escape

View File

@ -246,7 +246,7 @@ pub fn handle_set_pet_stay(
.ecs()
.write_storage::<comp::Agent>()
.get_mut(pet)
.map(|s| s.stay_pos = current_pet_position);
.map(|s| s.stay_pos = current_pet_position.filter(|_| stay));
}
}