compilation fixes (no review yet, currently just about to have dinner)

This commit is contained in:
toaster 2019-11-18 19:22:51 +00:00
parent f682de3f1b
commit 508fdb493b

View file

@ -33,7 +33,7 @@ static boolean spinmode = false;
static boolean thinkfly = false; static boolean thinkfly = false;
static mobj_t *overlay; static mobj_t *overlay;
static inline void B_ResetAI() static inline void B_ResetAI(void)
{ {
jump_last = false; jump_last = false;
spin_last = false; spin_last = false;
@ -429,6 +429,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16; cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
} }
} else { } else {
angle_t angle;
if (forward) if (forward)
cmd->forwardmove += MAXPLMOVE<<FRACBITS>>16; cmd->forwardmove += MAXPLMOVE<<FRACBITS>>16;
if (backward) if (backward)
@ -443,7 +444,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16; cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
// cap inputs so the bot can't accelerate faster diagonally // cap inputs so the bot can't accelerate faster diagonally
angle_t angle = R_PointToAngle2(0, 0, cmd->sidemove << FRACBITS, cmd->forwardmove << FRACBITS); angle = R_PointToAngle2(0, 0, cmd->sidemove << FRACBITS, cmd->forwardmove << FRACBITS);
INT32 maxforward = abs(P_ReturnThrustY(NULL, angle, MAXPLMOVE)); INT32 maxforward = abs(P_ReturnThrustY(NULL, angle, MAXPLMOVE));
INT32 maxside = abs(P_ReturnThrustX(NULL, angle, MAXPLMOVE)); INT32 maxside = abs(P_ReturnThrustX(NULL, angle, MAXPLMOVE));
cmd->forwardmove = max(min(cmd->forwardmove, maxforward), -maxforward); cmd->forwardmove = max(min(cmd->forwardmove, maxforward), -maxforward);