From dd658094c53c23701a48dd90e2d2e87be8b313ff Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Wed, 14 Mar 2012 02:47:15 +0000 Subject: [PATCH] Some cleanups --- reaction/code/game/ai_main.h | 12 ++++++------ reaction/code/game/ai_vcmd.c | 7 ++++--- reaction/code/game/bg_lib.h | 2 +- reaction/code/game/g_main.c | 21 +++++++++++++-------- reaction/code/game/g_missile.c | 1 + 5 files changed, 25 insertions(+), 18 deletions(-) diff --git a/reaction/code/game/ai_main.h b/reaction/code/game/ai_main.h index d71698cc..988030b6 100644 --- a/reaction/code/game/ai_main.h +++ b/reaction/code/game/ai_main.h @@ -217,7 +217,7 @@ typedef struct bot_state_s { float lastair_time; //last time the bot had air float teleport_time; //last time the bot teleported float camp_time; //last time camped - float camp_range; //camp range +// float camp_range; //camp range float weaponchange_time; //time the bot started changing weapons float firethrottlewait_time; //amount of time to wait float firethrottleshoot_time; //amount of time to shoot @@ -297,11 +297,11 @@ typedef struct bot_state_s { int ctfstrategy; //ctf strategy char subteam[32]; //sub team name float formation_dist; //formation team mate intervening space - char formation_teammate[16]; //netname of the team mate the bot uses for relative positioning - float formation_angle; //angle relative to the formation team mate - vec3_t formation_dir; //the direction the formation is moving in - vec3_t formation_origin; //origin the bot uses for relative positioning - bot_goal_t formation_goal; //formation goal +// char formation_teammate[16]; //netname of the team mate the bot uses for relative positioning +// float formation_angle; //angle relative to the formation team mate +// vec3_t formation_dir; //the direction the formation is moving in +// vec3_t formation_origin; //origin the bot uses for relative positioning +// bot_goal_t formation_goal; //formation goal bot_activategoal_t *activatestack; //first activate goal on the stack bot_activategoal_t activategoalheap[MAX_ACTIVATESTACK]; //activate goal heap diff --git a/reaction/code/game/ai_vcmd.c b/reaction/code/game/ai_vcmd.c index 79eb9bb5..5de41c91 100644 --- a/reaction/code/game/ai_vcmd.c +++ b/reaction/code/game/ai_vcmd.c @@ -493,7 +493,8 @@ voiceCommand_t voiceCommands[] = { int BotVoiceChatCommand(bot_state_t * bs, int mode, char *voiceChat) { - int i, voiceOnly, clientNum, color; + int i, clientNum; +// int i, voiceOnly, clientNum, color; char *ptr, buf[MAX_MESSAGE_SIZE], *cmd; if (!TeamPlayIsOn()) { @@ -509,7 +510,7 @@ int BotVoiceChatCommand(bot_state_t * bs, int mode, char *voiceChat) for (ptr = cmd; *cmd && *cmd > ' '; cmd++); while (*cmd && *cmd <= ' ') *cmd++ = '\0'; - voiceOnly = atoi(ptr); + //voiceOnly = atoi(ptr); for (ptr = cmd; *cmd && *cmd > ' '; cmd++); while (*cmd && *cmd <= ' ') *cmd++ = '\0'; @@ -517,7 +518,7 @@ int BotVoiceChatCommand(bot_state_t * bs, int mode, char *voiceChat) for (ptr = cmd; *cmd && *cmd > ' '; cmd++); while (*cmd && *cmd <= ' ') *cmd++ = '\0'; - color = atoi(ptr); + //color = atoi(ptr); if (!BotSameTeam(bs, clientNum)) { return qfalse; diff --git a/reaction/code/game/bg_lib.h b/reaction/code/game/bg_lib.h index eb32e385..5b4d1733 100644 --- a/reaction/code/game/bg_lib.h +++ b/reaction/code/game/bg_lib.h @@ -103,7 +103,7 @@ int _atoi( const char **stringPtr ); long strtol( const char *nptr, char **endptr, int base ); int Q_vsnprintf( char *buffer, size_t length, const char *fmt, va_list argptr ); -int Q_snprintf( char *buffer, size_t length, const char *fmt, ... ) __attribute__ ((format (printf, 3, 4))); +//int Q_snprintf( char *buffer, size_t length, const char *fmt, ... ) __attribute__ ((format (printf, 3, 4))); int sscanf( const char *buffer, const char *fmt, ... ) __attribute__ ((format (scanf, 2, 3))); diff --git a/reaction/code/game/g_main.c b/reaction/code/game/g_main.c index c8267fdc..8fc358d4 100644 --- a/reaction/code/game/g_main.c +++ b/reaction/code/game/g_main.c @@ -633,7 +633,7 @@ static cvarTable_t gameCvarTable[] = { {&g_teamAutoJoin, "g_teamAutoJoin", "0", CVAR_ARCHIVE}, {&g_teamForceBalance, "g_teamForceBalance", "0", CVAR_ARCHIVE}, {&g_warmup, "g_warmup", "20", CVAR_ARCHIVE, 0, qtrue}, - {&g_doWarmup, "g_doWarmup", "0", 0, 0, qtrue}, + {&g_doWarmup, "g_doWarmup", "0", CVAR_ARCHIVE, 0, qtrue}, {&g_logfile, "g_log", "reaction.log", CVAR_ARCHIVE, 0, qfalse}, {&g_logfileSync, "g_logsync", "0", CVAR_ARCHIVE, 0, qfalse}, {&g_password, "g_password", "", CVAR_USERINFO, 0, qfalse}, @@ -1322,6 +1322,10 @@ void G_InitGame(int levelTime, int randomSeed, int restart) // range are NEVER anything but clients level.num_entities = MAX_CLIENTS; + for ( i=0 ; iplane.normal[2] > 0.2 && VectorLength(ent->s.pos.trDelta) < 40) { G_SetOrigin(ent, trace->endpos); + ent->s.time = level.time / 4; return; } }