diff options
author | Theriaca <reichmeister@protonmail.com> | 2019-01-22 01:59:30 +0100 |
---|---|---|
committer | Theriaca <reichmeister@protonmail.com> | 2019-01-22 01:59:30 +0100 |
commit | 001b68a545797fd90505e523a1a4337e13f3b32c (patch) | |
tree | 798423069a22caab95d3eb6d182d48b9bafa5d58 /src/game | |
parent | bc4579cc888a13527a6f2013adea8d0c73257c18 (diff) |
fix all compiler warnings from "stock" code
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_admin.c | 14 | ||||
-rw-r--r-- | src/game/g_cmds.c | 29 |
2 files changed, 14 insertions, 29 deletions
diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 93c1d54..cee380e 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -7807,8 +7807,6 @@ qboolean G_admin_bring( gentity_t *ent, int skiparg ) qboolean G_admin_putmespec( gentity_t *ent, int skiparg ) { - int cs_offset; - if( !ent ) { ADMP( "!specme: sorry, but console isn't allowed on the spectators team\n"); @@ -7823,13 +7821,8 @@ qboolean G_admin_putmespec( gentity_t *ent, int skiparg ) if(ent->client->pers.teamSelection == PTE_NONE) return qfalse; - - if( ent->client->pers.teamSelection == PTE_ALIENS ) - cs_offset = 1; - else - cs_offset = 0; - //guard against build timer exploit + //guard against build timer exploit if( ent->client->pers.teamSelection != PTE_NONE && ent->client->sess.sessionTeam != TEAM_SPECTATOR && ( ent->client->ps.stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0 || ent->client->ps.stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0_UPG || @@ -9379,9 +9372,10 @@ qboolean G_admin_report( gentity_t *ent, int skiparg ) if( strstr( n2, s2 ) ) { - if( logmatch != i ) + if( logmatch != i ) logmatches++; - logmatch = i; + + logmatch = i; } } } diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index fb59950..0429d31 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -775,16 +775,6 @@ void Cmd_Team_f( gentity_t *ent ) if( level.time - ent->client->pers.teamChangeTime < 1000 ) return; - if( ent->client->pers.teamSelection != PTE_NONE ) - { - int cs_offset; - - if( ent->client->pers.teamSelection == PTE_ALIENS ) - cs_offset = 1; - else - cs_offset = 0; - } - // Prevent invisible players from joining a team if( ent->client->sess.invisible == qtrue ) { @@ -2701,11 +2691,12 @@ void Cmd_CallTeamVote_f( gentity_t *ent ) if( G_admin_permission( &g_entities[ clientNum ], ADMF_IMMUNITY ) ) { char reasonprint[ MAX_STRING_CHARS ] = ""; + if( reason[ 0 ] != '\0' ) - Com_sprintf(reasonprint, sizeof(reasonprint), "With reason: %s", reason); + Com_sprintf(reasonprint, sizeof(reasonprint), "With reason: %s", reason); - Com_sprintf( message, sizeof( message ), "%s^7 attempted /callteamvote %s %s on immune admin %s^7 %s^7", - ent->client->pers.netname, arg1, arg2, g_entities[ clientNum ].client->pers.netname, reasonprint ); + Com_sprintf( message, sizeof( message ), "%s^7 attempted /callteamvote %s %s on immune admin %s^7 %s^7", + ent->client->pers.netname, arg1, arg2, g_entities[ clientNum ].client->pers.netname, reasonprint ); } } else @@ -5337,12 +5328,12 @@ static void Cmd_Ignore_f( gentity_t *ent ) return; } - if( g_floodMinTime.integer ) - if ( G_Flood_Limited( ent ) ) - { - trap_SendServerCommand( ent-g_entities, "print \"Your chat is flood-limited; wait before chatting again\n\"" ); - return; - } + if( g_floodMinTime.integer ) + if ( G_Flood_Limited( ent ) ) + { + trap_SendServerCommand( ent-g_entities, "print \"Your chat is flood-limited; wait before chatting again\n\"" ); + return; + } if( ent->client->pers.teamSelection == PTE_ALIENS ) |