Add new botstuffs

This commit is contained in:
Shane Ellis 2021-01-23 10:30:07 -05:00
parent b8fea55f67
commit 4e47f240ad

View file

@ -313,9 +313,43 @@ typedef enum
RW_RAIL = 32 RW_RAIL = 32
} ringweapons_t; } ringweapons_t;
//Bot types
typedef enum
{
BOT_NONE = 0,
BOT_2PAI,
BOT_2PHUMAN,
BOT_MPAI
} bottype_t;
//AI states
typedef enum
{
AI_STANDBY = 0,
AI_FOLLOW,
AI_CATCHUP,
AI_THINKFLY,
AI_FLYSTANDBY,
AI_FLYCARRY,
AI_SPINFOLLOW
} aistatetype_t;
// ======================================================================== // ========================================================================
// PLAYER STRUCTURE // PLAYER STRUCTURE
// ======================================================================== // ========================================================================
//Bot memory struct
typedef struct botmem_s
{
boolean lastForward;
boolean lastBlocked;
boolean blocked;
UINT8 catchup_tics;
UINT8 thinkstate;
} botmem_t;
//Main struct
typedef struct player_s typedef struct player_s
{ {
mobj_t *mo; mobj_t *mo;
@ -526,7 +560,11 @@ typedef struct player_s
boolean spectator; boolean spectator;
boolean outofcoop; boolean outofcoop;
UINT8 bot; UINT8 bot;
struct player_s *botleader;
UINT16 lastbuttons;
botmem_t botmem;
boolean blocked;
tic_t jointime; // Timer when player joins game to change skin/color tic_t jointime; // Timer when player joins game to change skin/color
tic_t quittime; // Time elapsed since user disconnected, zero if connected tic_t quittime; // Time elapsed since user disconnected, zero if connected
#ifdef HWRENDER #ifdef HWRENDER