mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Mixed code and declaration stuff
This commit is contained in:
parent
5abf0c24f9
commit
6211c80a69
1 changed files with 2 additions and 1 deletions
|
@ -1641,11 +1641,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
if (camadjustfactor)
|
||||
{
|
||||
fixed_t sine = FINESINE((R_PointToAngle2(0, 0, player->rmomx, player->rmomy) - localangle)>>ANGLETOFINESHIFT);
|
||||
fixed_t factor;
|
||||
|
||||
if ((sine > 0) == (cmd->sidemove > 0))
|
||||
sine = 0; // Prevent jerking right when braking from going left, or vice versa
|
||||
|
||||
fixed_t factor = min(40, FixedMul(player->speed, abs(sine))*2 / FRACUNIT);
|
||||
factor = min(40, FixedMul(player->speed, abs(sine))*2 / FRACUNIT);
|
||||
|
||||
*myangle -= cmd->sidemove * factor * camadjustfactor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue