- SW: cleaned up the depth variable handling in SECT_USER which was endian dependent, including the savegame handler

This commit is contained in:
Christoph Oelckers 2021-04-19 00:24:25 +02:00
parent c17ec5fa45
commit c3e5cf322e
13 changed files with 34 additions and 65 deletions

View file

@ -1462,8 +1462,8 @@ DoPlayerSetWadeDepth(PLAYERp pp)
if (TEST(sectp->extra, SECTFX_SINK))
{
// make sure your even in the water
if (pp->posz + PLAYER_HEIGHT > pp->lo_sectp->floorz - Z(SectUser[pp->lo_sectp - sector]->depth))
pp->WadeDepth = SectUser[pp->lo_sectp - sector]->depth;
if (pp->posz + PLAYER_HEIGHT > pp->lo_sectp->floorz - Z(FixedToInt(SectUser[pp->lo_sectp - sector]->depth_fixed)))
pp->WadeDepth = FixedToInt(SectUser[pp->lo_sectp - sector]->depth_fixed);
}
}