Skip to content

Commit

Permalink
#196: Attempt to fix issue attaching horses.
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbroad committed Sep 16, 2022
1 parent 968f907 commit 4e8d05d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actors_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4e8d05d

Please sign in to comment.