mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 11:50:50 +00:00
Removed redundant momx/momy assignment from NiGHTS movement code.
Specifically, the being-hit code, where P_NightsTransferPoints is called afterwards anyway
This commit is contained in:
parent
dff64b854a
commit
947e8c56ec
1 changed files with 0 additions and 13 deletions
13
src/p_user.c
13
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);
|
||||
|
|
Loading…
Reference in a new issue