Merge branch 'drawangle-wind' into 'master'

Wind/current uses drawangle (resolves #683)

Closes #683

See merge request KartKrew/Kart!1500
This commit is contained in:
toaster 2023-09-16 19:32:56 +00:00
commit b71a8bc5b4

View file

@ -9268,16 +9268,15 @@ void T_Pusher(pusher_t *p)
thing->player->carry = CR_SLIDING; thing->player->carry = CR_SLIDING;
thing->angle = R_PointToAngle2(0, 0, xspeed, yspeed); thing->angle = R_PointToAngle2(0, 0, xspeed, yspeed);
// Previously modified boostangle, and didn't run in demo playback.
if (!demo.playback) // (Probably because SRB2's demo format was already storing and applying the camera changes made here?)
{ // Whatever the case, this is drawangle now so that players don't fly out of pusher setpieces.
angle_t angle = thing->player->boostangle; angle_t angle = thing->player->drawangle;
if (thing->angle - angle > ANGLE_180) if (thing->angle - angle > ANGLE_180)
thing->player->boostangle = angle - (angle - thing->angle) / 8; thing->player->drawangle = angle - (angle - thing->angle) / 8;
else else
thing->player->boostangle = angle + (thing->angle - angle) / 8; thing->player->drawangle = angle + (thing->angle - angle) / 8;
//P_SetPlayerAngle(thing->player, thing->angle); //P_SetPlayerAngle(thing->player, thing->angle);
}
} }