- fixed: smooth bobbing uses the full angular range to calculate its position.

This commit is contained in:
Christoph Oelckers 2016-04-07 11:14:39 +02:00
parent 14b370df66
commit 7f23a91488

View file

@ -443,12 +443,12 @@ void P_BobWeapon (player_t *player, pspdef_t *psp, float *x, float *y)
case AWeapon::BobSmooth:
*x = bobx*angle.Cos();
*y = 0.5f * (boby * (1.f - fabsf((angle * 2).Cos())));
*y = 0.5f * (boby * (1.f - ((angle * 2).Cos())));
break;
case AWeapon::BobInverseSmooth:
*x = bobx*angle.Cos();
*y = 0.5f * (boby * (1.f + fabsf((angle * 2).Cos())));
*y = 0.5f * (boby * (1.f + ((angle * 2).Cos())));
}
}
else