Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 8736 → Rev 8737

/source/duke3d/src/player.cpp
4750,7 → 4750,7
pPlayer->pos.z = floorZ - PMINHEIGHT;
}
 
#define GETZRANGECLIPDISTOFFSET 8
#define GETZRANGECLIPDISTOFFSET 16
 
void P_ProcessInput(int playerNum)
{
4792,7 → 4792,7
// sectorLotag can be set to 0 later on, but the same block sets spritebridge to 1
int sectorLotag = sector[pPlayer->cursectnum].lotag;
int getZRangeClipDist = pPlayer->clipdist - GETZRANGECLIPDISTOFFSET;
int getZRangeOffset = (((TEST_SYNC_KEY(playerBits, SK_CROUCH) && pPlayer->on_ground && !pPlayer->jumping_toggle) || (sectorLotag == ST_1_ABOVE_WATER && pPlayer->spritebridge != 1)))
int getZRangeOffset = (((TEST_SYNC_KEY(playerBits, SK_CROUCH) && (FURY || (pPlayer->on_ground && !pPlayer->jumping_toggle))) || (sectorLotag == ST_1_ABOVE_WATER && pPlayer->spritebridge != 1)))
? pPlayer->autostep_sbw
: pPlayer->autostep;
 
4806,14 → 4806,11
getZRangeOffset = 0;
getZRangeClipDist = 163L;
}
else
else
{
// we want to take these into account for getzrange() but not for the clipmove() call below
// this isn't taken into account when getZRangeOffset is initialized above because we first need
// the stepHeight value without this factored in
if (!pPlayer->on_ground)
getZRangeOffset = pPlayer->autostep_sbw;
 
if (sectorLotag != ST_2_UNDERWATER)
{
if (pPlayer->pos.z + getZRangeOffset > actor[pPlayer->i].floorz - PMINHEIGHT)
4842,14 → 4839,12
if ((lowZhit & 49152) == 16384 && sectorLotag == 1 && trueFloorDist > PHEIGHT + ZOFFSET2)
sectorLotag = 0;
 
actor[pPlayer->i].floorz = floorZ;
actor[pPlayer->i].ceilingz = ceilZ;
 
if ((highZhit & 49152) == 49152)
{
int const spriteNum = highZhit & (MAXSPRITES-1);
 
if (sprite[spriteNum].statnum == STAT_ACTOR && sprite[spriteNum].extra >= 0)
if ((sprite[spriteNum].z + PMINHEIGHT > pPlayer->pos.z)
|| (sprite[spriteNum].statnum == STAT_ACTOR && sprite[spriteNum].extra >= 0))
{
highZhit = 0;
ceilZ = pPlayer->truecz;
4856,6 → 4851,9
}
}
 
actor[pPlayer->i].floorz = floorZ;
actor[pPlayer->i].ceilingz = ceilZ;
 
if ((lowZhit & 49152) == 49152)
{
int spriteNum = lowZhit&(MAXSPRITES-1);