mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Bots work again
This commit is contained in:
parent
1029c01b05
commit
fc663d4d86
1 changed files with 5 additions and 1 deletions
|
|
@ -28,6 +28,8 @@
|
||||||
#include "r_things.h" // numskins
|
#include "r_things.h" // numskins
|
||||||
|
|
||||||
|
|
||||||
|
static INT16 bot_oldangleturn[MAXPLAYERS];
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
boolean K_AddBot(UINT8 skin, UINT8 difficulty, UINT8 *p)
|
boolean K_AddBot(UINT8 skin, UINT8 difficulty, UINT8 *p)
|
||||||
|
|
||||||
|
|
@ -682,7 +684,6 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
// Remove any existing controls
|
// Remove any existing controls
|
||||||
memset(cmd, 0, sizeof(ticcmd_t));
|
memset(cmd, 0, sizeof(ticcmd_t));
|
||||||
cmd->angleturn = (player->mo->angle >> 16);
|
|
||||||
|
|
||||||
if (gamestate != GS_LEVEL)
|
if (gamestate != GS_LEVEL)
|
||||||
{
|
{
|
||||||
|
|
@ -873,5 +874,8 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
||||||
{
|
{
|
||||||
Z_Free(predict);
|
Z_Free(predict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd->angleturn = (INT16)(cmd->angleturn + bot_oldangleturn[player - players]);
|
||||||
|
bot_oldangleturn[player - players] = cmd->angleturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue