- floatified playerJump

This commit is contained in:
Christoph Oelckers 2022-09-14 22:04:41 +02:00
parent 14b5984664
commit b712315ec3
4 changed files with 5 additions and 5 deletions

View file

@ -119,7 +119,7 @@ void playerisdead(int snum, int psectlotag, double fz, double cz);
void footprints(int snum);
int makepainsounds(int snum, int type);
void playerCrouch(int snum);
void playerJump(int snum, int fz, int cz);
void playerJump(int snum, double fz, double cz);
void checklook(int snum, ESyncBits actions);
void playerCenterView(int snum);

View file

@ -707,12 +707,12 @@ void playerCrouch(int snum)
}
}
void playerJump(int snum, int fz, int cz)
void playerJump(int snum, double floorz, double ceilingz)
{
auto p = &ps[snum];
if (p->jumping_toggle == 0 && p->jumping_counter == 0)
{
if ((fz - cz) > (56 << 8))
if ((floorz - ceilingz) > 56)
{
SetGameVarID(g_iReturnVarID, 0, p->GetActor(), snum);
OnEvent(EVENT_JUMP, snum, p->GetActor(), -1);

View file

@ -1913,7 +1913,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo
else if ((actions & SB_JUMP))
{
playerJump(snum, floorz * zworldtoint, ceilingz * zworldtoint);
playerJump(snum, floorz, ceilingz);
}
if (p->jumping_counter && (actions & SB_JUMP) == 0)

View file

@ -2247,7 +2247,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo
else if ((actions & SB_JUMP) && !p->OnMotorcycle && p->jumping_toggle == 0)
{
playerJump(snum, floorz* zworldtoint, ceilingz* zworldtoint);
playerJump(snum, floorz, ceilingz);
}
}