mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
fix shrunk player speed
git-svn-id: https://svn.eduke32.com/eduke32@1639 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a77c4744c4
commit
ddf83fbbf1
1 changed files with 9 additions and 5 deletions
|
@ -5274,18 +5274,22 @@ void P_ProcessInput(int32_t snum)
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
if (shrunk)
|
if (psectlotag == 2)
|
||||||
j = (p->runspeed>>1)+(p->runspeed>>2);
|
|
||||||
else if (psectlotag == 2)
|
|
||||||
j = 0x1400;
|
j = 0x1400;
|
||||||
else if (p->on_ground && (TEST_SYNC_KEY(sb_snum, SK_CROUCH) || (*kb > 10 && aplWeaponWorksLike[p->curr_weapon][snum] == KNEE_WEAPON)))
|
else if (p->on_ground && (TEST_SYNC_KEY(sb_snum, SK_CROUCH) || (*kb > 10 && aplWeaponWorksLike[p->curr_weapon][snum] == KNEE_WEAPON)))
|
||||||
j = 0x2000;
|
j = 0x2000;
|
||||||
|
|
||||||
p->posvel.x = mulscale(p->posvel.x,p->runspeed-j,16);
|
p->posvel.x = mulscale16(p->posvel.x,p->runspeed-j);
|
||||||
p->posvel.y = mulscale(p->posvel.y,p->runspeed-j,16);
|
p->posvel.y = mulscale16(p->posvel.y,p->runspeed-j);
|
||||||
|
|
||||||
if (klabs(p->posvel.x) < 2048 && klabs(p->posvel.y) < 2048)
|
if (klabs(p->posvel.x) < 2048 && klabs(p->posvel.y) < 2048)
|
||||||
p->posvel.x = p->posvel.y = 0;
|
p->posvel.x = p->posvel.y = 0;
|
||||||
|
|
||||||
|
if (shrunk)
|
||||||
|
{
|
||||||
|
p->posvel.x = mulscale16(p->posvel.x,p->runspeed-(p->runspeed>>1)+(p->runspeed>>2));
|
||||||
|
p->posvel.y = mulscale16(p->posvel.y,p->runspeed-(p->runspeed>>1)+(p->runspeed>>2));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HORIZONLY:
|
HORIZONLY:
|
||||||
|
|
Loading…
Reference in a new issue