Skip to content

Commit

Permalink
Improve traversing adjacent liquid sectors at different heights
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Dec 5, 2024
1 parent 191109f commit c3d665f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ bool P_IsInLiquid(mobj_t *thing)
{
const sector_t *sector = seclist->m_sector;

if (sector->terraintype < LIQUID || sector->isselfreferencing)
if ((sector->terraintype < LIQUID && thing->z == sector->floorheight) || sector->isselfreferencing)
return false;
}
}
Expand All @@ -1018,7 +1018,7 @@ bool P_IsInLiquid(mobj_t *thing)
{
const sector_t *sector = seclist->m_sector;

if (sector->terraintype < LIQUID || sector->isselfreferencing)
if ((sector->terraintype < LIQUID && thing->z == sector->floorheight) || sector->isselfreferencing)
return false;
}
}
Expand Down

0 comments on commit c3d665f

Please sign in to comment.