#define WPFLAG_NOMOVEFUNC 0x00200000 //don't move over if a func is under
#define WPFLAG_CALCULATED 0x00400000 //don't calculate it again
#define WPFLAG_NEVERONEWAY 0x00800000 //never flag it as one-way
#define LEVELFLAG_NOPOINTPREDICTION 1 //don't take waypoint beyond current into account when adjusting path view angles
#define LEVELFLAG_IGNOREINFALLBACK 2 //ignore enemies when in a fallback navigation routine
#define LEVELFLAG_IMUSTNTRUNAWAY 4 //don't be scared
#define WP_KEEP_FLAG_DIST 128
#define BWEAPONRANGE_MELEE 1
#define BWEAPONRANGE_MID 2
#define BWEAPONRANGE_LONG 3
#define BWEAPONRANGE_SABER 4
#define MELEE_ATTACK_RANGE 256
#define SABER_ATTACK_RANGE 128
#define MAX_CHICKENWUSS_TIME 10000 //wait 10 secs between checking which run-away path to take
#define BOT_RUN_HEALTH 40
#define BOT_WPTOUCH_DISTANCE 32
#define ENEMY_FORGET_MS 10000
//if our enemy isn't visible within 10000ms (aprx 10sec) then "forget" about him and treat him like every other threat, but still look for
//more immediate threats while main enemy is not visible
#define BOT_PLANT_DISTANCE 256 //plant if within this radius from the last spotted enemy position
#define BOT_PLANT_INTERVAL 15000 //only plant once per 15 seconds at max
#define BOT_PLANT_BLOW_DISTANCE 256 //blow det packs if enemy is within this radius and I am further away than the enemy
#define BOT_MAX_WEAPON_GATHER_TIME 1000 //spend a max of 1 second after spawn issuing orders to gather weapons before attacking enemy base
#define BOT_MAX_WEAPON_CHASE_TIME 15000 //time to spend gathering the weapon before persuing the enemy base (in case it takes longer than expected)
#define BOT_MAX_WEAPON_CHASE_CTF 5000 //time to spend gathering the weapon before persuing the enemy base (in case it takes longer than expected) [ctf-only]
#define BOT_MIN_SIEGE_GOAL_SHOOT 1024
#define BOT_MIN_SIEGE_GOAL_TRAVEL 128
#define BASE_GUARD_DISTANCE 256 //guarding the flag
#define BASE_FLAGWAIT_DISTANCE 256 //has the enemy flag and is waiting in his own base for his flag to be returned
#define BASE_GETENEMYFLAG_DISTANCE 256 //waiting around to get the enemy's flag
#define BOT_FLAG_GET_DISTANCE 256
#define BOT_SABER_THROW_RANGE 800
typedefenum
{
CTFSTATE_NONE,
CTFSTATE_ATTACKER,
CTFSTATE_DEFENDER,
CTFSTATE_RETRIEVAL,
CTFSTATE_GUARDCARRIER,
CTFSTATE_GETFLAGHOME,
CTFSTATE_MAXCTFSTATES
}bot_ctf_state_t;
typedefenum
{
SIEGESTATE_NONE,
SIEGESTATE_ATTACKER,
SIEGESTATE_DEFENDER,
SIEGESTATE_MAXSIEGESTATES
}bot_siege_state_t;
typedefenum
{
TEAMPLAYSTATE_NONE,
TEAMPLAYSTATE_FOLLOWING,
TEAMPLAYSTATE_ASSISTING,
TEAMPLAYSTATE_REGROUP,
TEAMPLAYSTATE_MAXTPSTATES
}bot_teamplay_state_t;
typedefstructbotattachment_s
{
intlevel;
charname[MAX_ATTACHMENT_NAME];
}botattachment_t;
typedefstructnodeobject_s
{
vec3_torigin;
// int index;
floatweight;
intflags;
#ifdef _XBOX
shortneighbornum;
shortinuse;
#else
intneighbornum;
intinuse;
#endif
}nodeobject_t;
typedefstructboteventtracker_s
{
inteventSequence;
intevents[MAX_PS_EVENTS];
floateventTime;
}boteventtracker_t;
typedefstructbotskills_s
{
intreflex;
floataccuracy;
floatturnspeed;
floatturnspeed_combat;
floatmaxturn;
intperfectaim;
}botskills_t;
//bot state
typedefstructbot_state_s
{
intinuse;//true if this state is used by a bot client
intbotthink_residual;//residual for the bot thinks
intclient;//client number of the bot
intentitynum;//entity number of the bot
playerState_tcur_ps;//current player state
usercmd_tlastucmd;//usercmd from last frame
bot_settings_tsettings;//several bot settings
floatthinktime;//time the bot thinks this frame
vec3_torigin;//origin of the bot
vec3_tvelocity;//velocity of the bot
vec3_teye;//eye coordinates of the bot
intsetupcount;//true when the bot has just been setup
floatltime;//local bot time
floatentergame_time;//time the bot entered the game
intms;//move state of the bot
intgs;//goal state of the bot
intws;//weapon state of the bot
vec3_tviewangles;//current view angles
vec3_tideal_viewangles;//ideal view angles
vec3_tviewanglespeed;
//rww - new AI values
gentity_t*currentEnemy;
gentity_t*revengeEnemy;
gentity_t*squadLeader;
gentity_t*lastHurt;
gentity_t*lastAttacked;
gentity_t*wantFlag;
gentity_t*touchGoal;
gentity_t*shootGoal;
gentity_t*dangerousObject;
vec3_tstaticFlagSpot;
intrevengeHateLevel;
intisSquadLeader;
intsquadRegroupInterval;
intsquadCannotLead;
intlastDeadTime;
wpobject_t*wpCurrent;
wpobject_t*wpDestination;
wpobject_t*wpStoreDest;
vec3_tgoalAngles;
vec3_tgoalMovedir;
vec3_tgoalPosition;
vec3_tlastEnemySpotted;
vec3_thereWhenSpotted;
intlastVisibleEnemyIndex;
inthitSpotted;
intwpDirection;
floatdestinationGrabTime;
floatwpSeenTime;
floatwpTravelTime;
floatwpDestSwitchTime;
floatwpSwitchTime;
floatwpDestIgnoreTime;
floattimeToReact;
floatenemySeenTime;
floatchickenWussCalculationTime;
floatbeStill;
floatduckTime;
floatjumpTime;
floatjumpHoldTime;
floatjumpPrep;
floatforceJumping;
floatjDelay;
floataimOffsetTime;
floataimOffsetAmtYaw;
floataimOffsetAmtPitch;
floatframe_Waypoint_Len;
intframe_Waypoint_Vis;
floatframe_Enemy_Len;
intframe_Enemy_Vis;
intisCamper;
floatisCamping;
wpobject_t*wpCamping;
wpobject_t*wpCampingTo;
qbooleancampStanding;
intrandomNavTime;
intrandomNav;
intsaberSpecialist;
intcanChat;
intchatFrequency;
charcurrentChat[MAX_CHAT_LINE_SIZE];
floatchatTime;
floatchatTime_stored;
intdoChat;
intchatTeam;
gentity_t*chatObject;
gentity_t*chatAltObject;
floatmeleeStrafeTime;
intmeleeStrafeDir;
floatmeleeStrafeDisable;
intaltChargeTime;
floatescapeDirTime;
floatdontGoBack;
intdoAttack;
intdoAltAttack;
intforceWeaponSelect;
intvirtualWeapon;
intplantTime;
intplantDecided;
intplantContinue;
intplantKillEmAll;
intrunningLikeASissy;
intrunningToEscapeThreat;
//char chatBuffer[MAX_CHAT_BUFFER_SIZE];
//Since we're once again not allocating bot structs dynamically,
//shoving a 64k chat buffer into one is a bad thing.