mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-05 09:21:15 +00:00
Refactor.
This commit is contained in:
parent
66d160be43
commit
b2de969d52
1 changed files with 6 additions and 4 deletions
10
src/p_user.c
10
src/p_user.c
|
@ -9209,7 +9209,7 @@ void P_PlayerThink(player_t *player)
|
|||
player->drawangle = player->mo->angle;
|
||||
else if (P_PlayerInPain(player))
|
||||
;
|
||||
else if (player->powers[pw_carry] && player->mo->tracer)
|
||||
else if (player->powers[pw_carry] && player->mo->tracer) // carry
|
||||
{
|
||||
switch (player->powers[pw_carry])
|
||||
{
|
||||
|
@ -9227,16 +9227,18 @@ void P_PlayerThink(player_t *player)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if ((player->pflags & PF_SPINNING) && (player->rmomx || player->rmomy)) // spin force
|
||||
player->drawangle = R_PointToAngle2(0, 0, player->rmomx, player->rmomy);
|
||||
else if (cmd->forwardmove || cmd->sidemove) // only when you're pressing movement keys
|
||||
{
|
||||
#if 1
|
||||
if (!((player->pflags & PF_SPINNING)
|
||||
|| ((player->pflags & PF_JUMPED) && !(player->charflags & SF_NOJUMPSPIN)))
|
||||
if (!((player->pflags & PF_JUMPED)
|
||||
&& !(player->charflags & SF_NOJUMPSPIN))
|
||||
#else
|
||||
if ((player->mo->movefactor < FRACUNIT) // hilarious absence of traction!
|
||||
|| (player->powers[pw_pushing])
|
||||
#endif
|
||||
|| !(player->rmomx || player->rmomy)) // adjust to new angle
|
||||
|| !(player->rmomx || player->rmomy)) // prevent a flicker when just starting out
|
||||
player->drawangle = player->mo->angle + R_PointToAngle2(0, 0, cmd->forwardmove<<FRACBITS, -cmd->sidemove<<FRACBITS);
|
||||
else
|
||||
player->drawangle = R_PointToAngle2(0, 0, player->rmomx, player->rmomy);
|
||||
|
|
Loading…
Reference in a new issue