From 4e8d05d27935a6fdc108aeb0792046a466cf183c Mon Sep 17 00:00:00 2001 From: Paul Broadhead Date: Fri, 16 Sep 2022 01:09:11 +0100 Subject: [PATCH] #196: Attempt to fix issue attaching horses. --- actors_list.cpp | 2 +- select.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actors_list.cpp b/actors_list.cpp index 0deb4c732..b4ef86026 100644 --- a/actors_list.cpp +++ b/actors_list.cpp @@ -85,7 +85,7 @@ const actor* LockedActorsList::get_nearest_actor(int tile_x, int tile_y, float m for (const auto& id_act: _list) { const actor* act = id_act.second.unwrap(); - if (act->dead || act->kind_of_actor == NPC || act->kind_of_actor == HUMAN + if (act->actor_id >= HORSE_ID_OFFSET || act->dead || act->kind_of_actor == NPC || act->kind_of_actor == HUMAN || act->kind_of_actor == COMPUTER_CONTROLLED_HUMAN) { continue; diff --git a/select.cpp b/select.cpp index 1d7765bca..0fa789972 100644 --- a/select.cpp +++ b/select.cpp @@ -139,7 +139,7 @@ static inline void update_selection(Uint8 *color) { eternal_lands::LockedActorsList list; list.set_actor_under_mouse(selections[index].id); - object_under_mouse = selections[index].id; + object_under_mouse = (selections[index].id >= HORSE_ID_OFFSET) ?-1 : selections[index].id; break; } default: