- fix remaining interpolation issue with weapon swaying when taking off again from a stand-still.

This commit is contained in:
Mitchell Richters 2020-08-02 15:36:45 +10:00 committed by Christoph Oelckers
parent 6fd6926d8d
commit abb23a7bd0

View file

@ -2741,7 +2741,15 @@ void processinput_d(int snum)
p->weapon_sway += 96;
else p->oweapon_sway = p->weapon_sway = 1024;
}
else p->weapon_sway = p->bobcounter;
else
{
p->weapon_sway = p->bobcounter;
if ((p->bobcounter - p->oweapon_sway) > 256)
{
p->oweapon_sway = p->weapon_sway;
}
}
s->xvel =
ksqrt((p->posx - p->bobposx) * (p->posx - p->bobposx) + (p->posy - p->bobposy) * (p->posy - p->bobposy));