mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Fix all the NiGHTS issues in one fell swoop (assuming they are fixed, that is, lol)
Basically I kind of worked around any potential trig inaccuracies by not using the player position directly for setting momx/momy. This way, if player->angle_pos == player->old_angle_pos, momx/momy are zero
This commit is contained in:
parent
f579a12d2c
commit
89ce257248
1 changed files with 3 additions and 2 deletions
|
@ -4952,8 +4952,9 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const angle_t fa = player->angle_pos>>ANGLETOFINESHIFT;
|
const angle_t fa = player->angle_pos>>ANGLETOFINESHIFT;
|
||||||
player->mo->momx = player->mo->target->x + FixedMul(FINECOSINE(fa),radius) - player->mo->x;
|
const angle_t faold = player->old_angle_pos>>ANGLETOFINESHIFT;
|
||||||
player->mo->momy = player->mo->target->y + FixedMul(FINESINE(fa),radius) - player->mo->y;
|
player->mo->momx = FixedMul(FINECOSINE(fa),radius) - FixedMul(FINECOSINE(faold),radius);
|
||||||
|
player->mo->momy = FixedMul(FINESINE(fa),radius) - FixedMul(FINESINE(faold),radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->exiting)
|
if (player->exiting)
|
||||||
|
|
Loading…
Reference in a new issue