mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Remove getzsofslope_player() and use yax_getzsofslope() and getcorrectzsofslope() to determine the player's .truecz and .truefz values
git-svn-id: https://svn.eduke32.com/eduke32@8110 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3e4f2de79a
commit
4e15b11571
1 changed files with 2 additions and 45 deletions
|
@ -4424,49 +4424,6 @@ static int P_DoFist(DukePlayer_t *pPlayer)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
|
||||||
static void getzsofslope_player(int sectNum, int playerX, int playerY, int32_t *pCeilZ, int32_t *pFloorZ)
|
|
||||||
{
|
|
||||||
int didCeiling = 0;
|
|
||||||
|
|
||||||
if ((sector[sectNum].ceilingstat & 512) == 0)
|
|
||||||
{
|
|
||||||
int const neighborSect = yax_getneighborsect(playerX, playerY, sectNum, YAX_CEILING);
|
|
||||||
|
|
||||||
if (neighborSect >= 0)
|
|
||||||
{
|
|
||||||
*pCeilZ = getceilzofslope(neighborSect, playerX, playerY);
|
|
||||||
didCeiling = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int didFloor = 0;
|
|
||||||
|
|
||||||
if ((sector[sectNum].floorstat & 512) == 0)
|
|
||||||
{
|
|
||||||
int const neighborSect = yax_getneighborsect(playerX, playerY, sectNum, YAX_FLOOR);
|
|
||||||
|
|
||||||
if (neighborSect >= 0)
|
|
||||||
{
|
|
||||||
*pFloorZ = getflorzofslope(neighborSect, playerX, playerY);
|
|
||||||
didFloor = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!didCeiling || !didFloor)
|
|
||||||
{
|
|
||||||
int32_t ceilingZ, floorZ;
|
|
||||||
getzsofslope(sectNum, playerX, playerY, &ceilingZ, &floorZ);
|
|
||||||
|
|
||||||
if (!didCeiling)
|
|
||||||
*pCeilZ = ceilingZ;
|
|
||||||
|
|
||||||
if (!didFloor)
|
|
||||||
*pFloorZ = floorZ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void P_UpdatePosWhenViewingCam(DukePlayer_t *pPlayer)
|
void P_UpdatePosWhenViewingCam(DukePlayer_t *pPlayer)
|
||||||
{
|
{
|
||||||
int const newOwner = pPlayer->newowner;
|
int const newOwner = pPlayer->newowner;
|
||||||
|
@ -4743,9 +4700,9 @@ void P_ProcessInput(int playerNum)
|
||||||
pPlayer->sbs = 0;
|
pPlayer->sbs = 0;
|
||||||
|
|
||||||
#ifdef YAX_ENABLE
|
#ifdef YAX_ENABLE
|
||||||
getzsofslope_player(pPlayer->cursectnum, pPlayer->pos.x, pPlayer->pos.y, &pPlayer->truecz, &pPlayer->truefz);
|
yax_getzsofslope(pPlayer->cursectnum, pPlayer->pos.x, pPlayer->pos.y, &pPlayer->truecz, &pPlayer->truefz);
|
||||||
#else
|
#else
|
||||||
getzsofslope(pPlayer->cursectnum, pPlayer->pos.x, pPlayer->pos.y, &pPlayer->truecz, &pPlayer->truefz);
|
getcorrectzsofslope(pPlayer->cursectnum, pPlayer->pos.x, pPlayer->pos.y, &pPlayer->truecz, &pPlayer->truefz);
|
||||||
#endif
|
#endif
|
||||||
int const trueFloorZ = pPlayer->truefz;
|
int const trueFloorZ = pPlayer->truefz;
|
||||||
int const trueFloorDist = klabs(pPlayer->pos.z - trueFloorZ);
|
int const trueFloorDist = klabs(pPlayer->pos.z - trueFloorZ);
|
||||||
|
|
Loading…
Reference in a new issue