- got rid of ksgn.
Because every bit of Build code that can be removed is a good thing.
This was only used in two places, one of which could be done better, the other one in the voxel drawer setup now uses a local C-inline version.
(cherry picked from commit 5536184bee)
This commit is contained in:
parent
b7d5110a49
commit
5d210c64e0
5 changed files with 7 additions and 35 deletions
|
|
@ -2610,11 +2610,7 @@ void P_PlayerThink (player_t *player)
|
|||
else if (cmd->ucmd.upmove != 0)
|
||||
{
|
||||
// Clamp the speed to some reasonable maximum.
|
||||
int magnitude = abs (cmd->ucmd.upmove);
|
||||
if (magnitude > 0x300)
|
||||
{
|
||||
cmd->ucmd.upmove = ksgn (cmd->ucmd.upmove) * 0x300;
|
||||
}
|
||||
cmd->ucmd.upmove = clamp<short>(cmd->ucmd.upmove, -0x300, 0x300);
|
||||
if (player->mo->waterlevel >= 2 || (player->mo->flags2 & MF2_FLY) || (player->cheats & CF_NOCLIP2))
|
||||
{
|
||||
player->mo->Vel.Z = player->mo->Speed * cmd->ucmd.upmove / 128.;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue