Skip to content

Commit

Permalink
Do not explore with non-existing creatures (#3673)
Browse files Browse the repository at this point in the history
stops log errors from appearing
  • Loading branch information
Loobinex authored Nov 14, 2024
1 parent 7f2a442 commit 5c2b851
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/thing_doors.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ long destroy_door(struct Thing *doortng)
if (!player_exists(player))
continue;
struct Thing* thing = thing_get(player->controlled_thing_idx);
if (thing == INVALID_THING)
continue;
MapCoordDelta dist = get_chessboard_distance(&pos, &thing->mappos);
long sight_stl = slab_subtile(get_explore_sight_distance_in_slabs(thing), 0);
if (dist <= subtile_coord(sight_stl,0)) {
Expand Down

0 comments on commit 5c2b851

Please sign in to comment.