Bots will now pretend their imaginary accelerate buttons are real, just so PF_ACCELDOWN is properly tracked.

This commit is contained in:
toaster 2021-02-21 15:58:25 +00:00
parent 08d087c6b5
commit b49e44bd97

View file

@ -990,7 +990,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
rad = playerwidth; rad = playerwidth;
} }
cmd->buttons |= BT_ACCELERATE; cmd->buttons |= (BT_ACCELERATE|BT_REALACCELERATE);
// Full speed ahead! // Full speed ahead!
cmd->forwardmove = MAXPLMOVE; cmd->forwardmove = MAXPLMOVE;
@ -1067,7 +1067,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
// where we figure out what the shape of the track looks like. // where we figure out what the shape of the track looks like.
UINT16 oldButtons = cmd->buttons; UINT16 oldButtons = cmd->buttons;
cmd->buttons &= ~(BT_ACCELERATE|BT_BRAKE); cmd->buttons &= ~(BT_ACCELERATE|BT_REALACCELERATE|BT_BRAKE);
if (oldButtons & BT_ACCELERATE) if (oldButtons & BT_ACCELERATE)
{ {
@ -1076,7 +1076,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
if (oldButtons & BT_BRAKE) if (oldButtons & BT_BRAKE)
{ {
cmd->buttons |= BT_ACCELERATE; cmd->buttons |= (BT_ACCELERATE|BT_REALACCELERATE);
} }
cmd->forwardmove = -cmd->forwardmove; cmd->forwardmove = -cmd->forwardmove;