diff options
-rw-r--r-- | src/game/g_local.h | 1 | ||||
-rw-r--r-- | src/game/g_main.c | 89 | ||||
-rw-r--r-- | src/game/g_syscalls.c | 5 | ||||
-rw-r--r-- | src/server/server.h | 1 | ||||
-rw-r--r-- | src/server/sv_game.c | 1 | ||||
-rw-r--r-- | src/server/sv_main.c | 33 |
6 files changed, 0 insertions, 130 deletions
diff --git a/src/game/g_local.h b/src/game/g_local.h index 8e7aab8a..5df8b2bf 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -1226,7 +1226,6 @@ void trap_GetUsercmd( int clientNum, usercmd_t *cmd ); qboolean trap_GetEntityToken( char *buffer, int bufferSize ); void trap_SnapVector( float *v ); -void trap_SendGameStat( const char *data ); void trap_AddCommand( const char *cmdName ); void trap_RemoveCommand( const char *cmdName ); diff --git a/src/game/g_main.c b/src/game/g_main.c index 2d3be8e1..e388c878 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1739,93 +1739,6 @@ void QDECL G_LogPrintf( const char *fmt, ... ) } /* -================= -G_SendGameStat -================= -*/ -void G_SendGameStat( team_t team ) -{ - char map[ MAX_STRING_CHARS ]; - char teamChar; - char data[ BIG_INFO_STRING ]; - char entry[ MAX_STRING_CHARS ]; - int i, dataLength, entryLength; - gclient_t *cl; - - // games with cheats enabled are not very good for balance statistics - if( g_cheats.integer ) - return; - - trap_Cvar_VariableStringBuffer( "mapname", map, sizeof( map ) ); - - switch( team ) - { - case TEAM_ALIENS: teamChar = 'A'; break; - case TEAM_HUMANS: teamChar = 'H'; break; - case TEAM_NONE: teamChar = 'L'; break; - default: return; - } - - Com_sprintf( data, BIG_INFO_STRING, - "%s %s T:%c A:%f H:%f M:%s D:%d SD:%d AS:%d AS2T:%d AS3T:%d HS:%d HS2T:%d HS3T:%d CL:%d", - Q3_VERSION, - g_tag.string, - teamChar, - level.averageNumAlienClients, - level.averageNumHumanClients, - map, - level.time - level.startTime, - G_TimeTilSuddenDeath( ), - g_alienStage.integer, - level.alienStage2Time - level.startTime, - level.alienStage3Time - level.startTime, - g_humanStage.integer, - level.humanStage2Time - level.startTime, - level.humanStage3Time - level.startTime, - level.numConnectedClients ); - - dataLength = strlen( data ); - - for( i = 0; i < level.numConnectedClients; i++ ) - { - int ping; - - cl = &level.clients[ level.sortedClients[ i ] ]; - - if( cl->pers.connected == CON_CONNECTING ) - ping = -1; - else - ping = cl->ps.ping < 999 ? cl->ps.ping : 999; - - switch( cl->ps.stats[ STAT_TEAM ] ) - { - case TEAM_ALIENS: teamChar = 'A'; break; - case TEAM_HUMANS: teamChar = 'H'; break; - case TEAM_NONE: teamChar = 'S'; break; - default: return; - } - - Com_sprintf( entry, MAX_STRING_CHARS, - " \"%s\" %c %d %d %d", - cl->pers.netname, - teamChar, - cl->ps.persistant[ PERS_SCORE ], - ping, - ( level.time - cl->pers.enterTime ) / 60000 ); - - entryLength = strlen( entry ); - - if( dataLength + entryLength >= BIG_INFO_STRING ) - break; - - strcpy( data + dataLength, entry ); - dataLength += entryLength; - } - - trap_SendGameStat( data ); -} - -/* ================ LogExit @@ -1882,8 +1795,6 @@ void LogExit( const char *string ) ent->use( ent, ent, ent ); } } - - G_SendGameStat( level.lastWin ); } diff --git a/src/game/g_syscalls.c b/src/game/g_syscalls.c index 37236b95..5622249e 100644 --- a/src/game/g_syscalls.c +++ b/src/game/g_syscalls.c @@ -257,11 +257,6 @@ void trap_SnapVector( float *v ) syscall( G_SNAPVECTOR, v ); } -void trap_SendGameStat( const char *data ) -{ - syscall( G_SEND_GAMESTAT, data ); -} - int trap_Parse_AddGlobalDefine( char *define ) { return syscall( G_PARSE_ADD_GLOBAL_DEFINE, define ); diff --git a/src/server/server.h b/src/server/server.h index 57d34b5b..d5e69eb2 100644 --- a/src/server/server.h +++ b/src/server/server.h @@ -321,7 +321,6 @@ void SV_RemoveOperatorCommands (void); void SV_MasterShutdown (void); -void SV_MasterGameStat( const char *data ); int SV_RateMsec(client_t *client); diff --git a/src/server/sv_game.c b/src/server/sv_game.c index c9b317fc..734d4559 100644 --- a/src/server/sv_game.c +++ b/src/server/sv_game.c @@ -419,7 +419,6 @@ intptr_t SV_GameSystemCalls( intptr_t *args ) { return 0; case G_SEND_GAMESTAT: - SV_MasterGameStat( VMA(1) ); return 0; //==================================== diff --git a/src/server/sv_main.c b/src/server/sv_main.c index 6082c998..ec0954a5 100644 --- a/src/server/sv_main.c +++ b/src/server/sv_main.c @@ -332,39 +332,6 @@ void SV_MasterShutdown( void ) { } /* -================= -SV_MasterGameStat -================= -*/ -void SV_MasterGameStat( const char *data ) -{ - netadr_t adr; - - if( !com_dedicated || com_dedicated->integer != 2 ) - return; // only dedicated servers send stats - - Com_Printf( "Resolving %s\n", MASTER_SERVER_NAME ); - - switch( NET_StringToAdr( MASTER_SERVER_NAME, &adr, NA_UNSPEC ) ) - { - case 0: - Com_Printf( "Couldn't resolve master address: %s\n", MASTER_SERVER_NAME ); - return; - - case 2: - adr.port = BigShort( PORT_MASTER ); - default: - break; - } - - Com_Printf( "%s resolved to %s\n", MASTER_SERVER_NAME, - NET_AdrToStringwPort( adr ) ); - - Com_Printf( "Sending gamestat to %s\n", MASTER_SERVER_NAME ); - NET_OutOfBandPrint( NS_SERVER, adr, "gamestat %s", data ); -} - -/* ============================================================================== CONNECTIONLESS COMMANDS |