This is a better version of r7468

git-svn-id: https://svn.eduke32.com/eduke32@7469 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-03-30 20:57:56 +00:00 committed by Christoph Oelckers
parent 3926ae2d4f
commit b7160bf27c

View file

@ -4498,19 +4498,10 @@ static void P_DoWater(int const playerNum, int const playerBits, int const floor
pPlayer->vel.z = 0;
}
int spriteNum;
for (SPRITES_OF_SECT(pPlayer->cursectnum, spriteNum))
if (sprite[spriteNum].statnum == STAT_TRANSPORT)
break;
if (spriteNum == -1)
if ((pPlayer->on_warping_sector == 0 || ceilZ != pPlayer->truecz) && pPlayer->pos.z < ceilZ + PMINHEIGHT)
{
if (pPlayer->pos.z < ceilZ + PMINHEIGHT)
{
pPlayer->pos.z = ceilZ + PMINHEIGHT;
pPlayer->vel.z = 0;
}
pPlayer->pos.z = ceilZ + PMINHEIGHT;
pPlayer->vel.z = 0;
}
if (pPlayer->scuba_on && (krand()&255) < 8)
@ -5120,8 +5111,6 @@ void P_ProcessInput(int playerNum)
}
}
pPlayer->on_warping_sector = 0;
if (TEST_SYNC_KEY(playerBits, SK_CROUCH))
{
// crouching
@ -5437,6 +5426,8 @@ HORIZONLY:;
A_PlaySound(DUKE_ONWATER, pPlayer->i);
#endif
pPlayer->on_warping_sector = 0;
if (pPlayer->cursectnum >= 0 && ud.noclip == 0)
{
int const squishPlayer = (pushmove((vec3_t *)pPlayer, &pPlayer->cursectnum, pPlayer->clipdist, (4L << 8), stepHeight, CLIPMASK0) < 0 &&