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:
Monster Iestyn 2016-05-14 23:57:56 +01:00
parent f579a12d2c
commit 89ce257248
1 changed files with 3 additions and 2 deletions

View File

@ -4952,8 +4952,9 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad
else
{
const angle_t fa = player->angle_pos>>ANGLETOFINESHIFT;
player->mo->momx = player->mo->target->x + FixedMul(FINECOSINE(fa),radius) - player->mo->x;
player->mo->momy = player->mo->target->y + FixedMul(FINESINE(fa),radius) - player->mo->y;
const angle_t faold = player->old_angle_pos>>ANGLETOFINESHIFT;
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)