mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-01 09:42:27 +00:00
- use sectnum and wallnum to get an index from pointers instead of subtracting the array base.
This commit is contained in:
parent
3a259c9c46
commit
adf3133fdc
24 changed files with 81 additions and 78 deletions
|
@ -1442,8 +1442,8 @@ void 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(FixedToInt(SectUser[pp->lo_sectp - sector]->depth_fixed)))
|
||||
pp->WadeDepth = FixedToInt(SectUser[pp->lo_sectp - sector]->depth_fixed);
|
||||
if (pp->posz + PLAYER_HEIGHT > pp->lo_sectp->floorz - Z(FixedToInt(SectUser[sectnum(pp->lo_sectp)]->depth_fixed)))
|
||||
pp->WadeDepth = FixedToInt(SectUser[sectnum(pp->lo_sectp)]->depth_fixed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue