mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-01 05:20:43 +00:00
- floatified operateJetpack
This commit is contained in:
parent
583a5bd0e3
commit
89cb29292c
1 changed files with 4 additions and 4 deletions
|
@ -1704,7 +1704,7 @@ void checkweapons_d(player_struct* p)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz, int cz, int shrunk)
|
||||
static void operateJetpack(int snum, ESyncBits actions, int psectlotag, double floorz, double ceilingz, int shrunk)
|
||||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
|
@ -1765,8 +1765,8 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz,
|
|||
if (psectlotag != 2 && p->scuba_on == 1)
|
||||
p->scuba_on = 0;
|
||||
|
||||
if (p->player_int_pos().Z > (fz - (k << 8)))
|
||||
p->pos.Z += (((fz - (k << 8)) - p->player_int_pos().Z) >> 1) * zinttoworld;
|
||||
if (p->pos.Z > floorz - k)
|
||||
p->pos.Z += ((floorz - k) - p->pos.Z) * 0.5;
|
||||
if (p->pos.Z < pact->ceilingz + 18)
|
||||
p->pos.Z = pact->ceilingz + 18;
|
||||
|
||||
|
@ -2911,7 +2911,7 @@ void processinput_d(int snum)
|
|||
|
||||
else if (p->jetpack_on)
|
||||
{
|
||||
operateJetpack(snum, actions, psectlotag, fz, cz, shrunk);
|
||||
operateJetpack(snum, actions, psectlotag, fz * inttoworld, cz * inttoworld, shrunk);
|
||||
}
|
||||
else if (psectlotag != ST_2_UNDERWATER)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue