From 947e8c56ecc66c5e33257f50b533c2280edb10e2 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 14 May 2016 22:52:12 +0100 Subject: [PATCH] Removed redundant momx/momy assignment from NiGHTS movement code. Specifically, the being-hit code, where P_NightsTransferPoints is called afterwards anyway --- src/p_user.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 681e449fb..26b60e76b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -5681,19 +5681,6 @@ static void P_NiGHTSMovement(player_t *player) player->angle_pos += FixedAngleC(FixedDiv(xspeed,5*FRACUNIT),40*FRACUNIT); } - if (player->pflags & PF_TRANSFERTOCLOSEST) - { - const angle_t fa = R_PointToAngle2(player->axis1->x, player->axis1->y, player->axis2->x, player->axis2->y); - P_InstaThrust(player->mo, fa, xspeed/10); - } - 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; - } - player->mo->momz = 0; P_NightsTransferPoints(player, xspeed, radius);