From 7f9a04fd80a28644d7e0633304129eca44dfba14 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 18 Jun 2012 16:27:00 +0000 Subject: [PATCH] REFACTOR From /dev/humancontroller. --- code/cgame/cg_event.c | 4 ++-- code/game/ai_dmq3.c | 1 - code/game/g_spawn.c | 2 +- code/game/g_syscalls.c | 2 +- code/ui/ui_main.c | 1 - code/ui/ui_syscalls.c | 1 + 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/cgame/cg_event.c b/code/cgame/cg_event.c index 5be58384..a8568705 100644 --- a/code/cgame/cg_event.c +++ b/code/cgame/cg_event.c @@ -1066,13 +1066,13 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) { if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) { } else { - if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) { + if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) { #ifdef MISSIONPACK if (cgs.gametype == GT_1FCTF) CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound ); else #endif - CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound ); + CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound ); } else if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) { #ifdef MISSIONPACK diff --git a/code/game/ai_dmq3.c b/code/game/ai_dmq3.c index ada5b5d6..4100fbed 100644 --- a/code/game/ai_dmq3.c +++ b/code/game/ai_dmq3.c @@ -2301,7 +2301,6 @@ int BotWantsToRetreat(bot_state_t *bs) { #endif // if (bs->enemy >= 0) { - //if the enemy is carrying a flag BotEntityInfo(bs->enemy, &entinfo); // if the enemy is carrying a flag if (EntityCarriesFlag(&entinfo)) return qfalse; diff --git a/code/game/g_spawn.c b/code/game/g_spawn.c index 9d05cc5e..2828a6e9 100644 --- a/code/game/g_spawn.c +++ b/code/game/g_spawn.c @@ -485,7 +485,7 @@ char *G_AddSpawnVarToken( const char *string ) { l = strlen( string ); if ( level.numSpawnVarChars + l + 1 > MAX_SPAWN_VARS_CHARS ) { - G_Error( "G_AddSpawnVarToken: MAX_SPAWN_VARS" ); + G_Error( "G_AddSpawnVarToken: MAX_SPAWN_VARS_CHARS" ); } dest = level.spawnVarChars + level.numSpawnVarChars; diff --git a/code/game/g_syscalls.c b/code/game/g_syscalls.c index 8d385a22..b615301e 100644 --- a/code/game/g_syscalls.c +++ b/code/game/g_syscalls.c @@ -48,6 +48,7 @@ void trap_Printf( const char *fmt ) { void trap_Error(const char *fmt) { syscall(G_ERROR, fmt); + // shut up GCC warning about returning functions, because we know better exit(1); } @@ -227,7 +228,6 @@ int trap_RealTime( qtime_t *qtime ) { void trap_SnapVector( float *v ) { syscall( G_SNAPVECTOR, v ); - return; } // BotLib traps start here diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 7e7e2421..94100ae6 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -5108,7 +5108,6 @@ void _UI_Init( qboolean inGameLoad ) { uiInfo.uiDC.drawSides = &_UI_DrawSides; uiInfo.uiDC.drawTopBottom = &_UI_DrawTopBottom; uiInfo.uiDC.clearScene = &trap_R_ClearScene; - uiInfo.uiDC.drawSides = &_UI_DrawSides; uiInfo.uiDC.addRefEntityToScene = &trap_R_AddRefEntityToScene; uiInfo.uiDC.renderScene = &trap_R_RenderScene; uiInfo.uiDC.registerFont = &trap_R_RegisterFont; diff --git a/code/ui/ui_syscalls.c b/code/ui/ui_syscalls.c index d1488ced..cb4b853a 100644 --- a/code/ui/ui_syscalls.c +++ b/code/ui/ui_syscalls.c @@ -47,6 +47,7 @@ void trap_Print( const char *string ) { void trap_Error(const char *string) { syscall(UI_ERROR, string); + // shut up GCC warning about returning functions, because we know better exit(1); }