Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Jan 18, 2025
1 parent 08e3323 commit 8b97da5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/p_floor.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,6 @@ void P_CheckTerrainType(sector_t *sector)

if (!(thing->flags & MF_SPAWNCEILING) && (thing->flags2 & MF2_FOOTCLIP))
thing->flags2 |= MF2_FEETARECLIPPED;
else
thing->flags2 &= ~MF2_FEETARECLIPPED;
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ bool P_IsInLiquid(mobj_t *thing)
if (!thing->player && thing->z > highestsector->floorheight + 2 * FRACUNIT)
return false;

return (highestsector->terraintype >= LIQUID);
return (highestsector->terraintype >= LIQUID && !(thing->flags & MF_SPAWNCEILING));
}

//
Expand Down
2 changes: 1 addition & 1 deletion src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ mobj_t *P_SpawnMobj(const fixed_t x, const fixed_t y, const fixed_t z, const mob
mobj->height = info->height;
mobj->z = mobj->oldz = mobj->floorz;

if ((mobj->flags2 & MF2_FOOTCLIP) && !sector->heightsec && P_IsInLiquid(mobj))
if ((mobj->flags2 & MF2_FOOTCLIP) && P_IsInLiquid(mobj))
mobj->flags2 |= MF2_FEETARECLIPPED;
}
else if (z == ONCEILINGZ)
Expand Down

0 comments on commit 8b97da5

Please sign in to comment.