aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-28 23:18:34 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-28 23:18:34 +0000
commit746565c9294796e5b803b7c3838dc2ec574b0f16 (patch)
treefb9729922f66155e997f8eb3fad815c87812c3bf
parentec912002d3f75729c627cf467903c4607a529495 (diff)
downloadioquake3-aero-746565c9294796e5b803b7c3838dc2ec574b0f16.tar.gz
ioquake3-aero-746565c9294796e5b803b7c3838dc2ec574b0f16.zip
* Some game bug fixes from http://www.quake3world.com/ubb/Forum4/HTML/006208.html
git-svn-id: svn://svn.icculus.org/quake3/trunk@124 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/cgame/cg_servercmds.c2
-rw-r--r--code/game/g_client.c12
-rw-r--r--code/game/g_main.c19
3 files changed, 29 insertions, 4 deletions
diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c
index 6558d2f..94ad2ad 100644
--- a/code/cgame/cg_servercmds.c
+++ b/code/cgame/cg_servercmds.c
@@ -323,7 +323,7 @@ static void CG_ConfigStringModified( void ) {
cg.intermissionStarted = atoi( str );
} else if ( num >= CS_MODELS && num < CS_MODELS+MAX_MODELS ) {
cgs.gameModels[ num-CS_MODELS ] = trap_R_RegisterModel( str );
- } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_MODELS ) {
+ } else if ( num >= CS_SOUNDS && num < CS_SOUNDS+MAX_SOUNDS ) {
if ( str[0] != '*' ) { // player specific sounds don't register here
cgs.gameSounds[ num-CS_SOUNDS] = trap_S_RegisterSound( str, qfalse );
}
diff --git a/code/game/g_client.c b/code/game/g_client.c
index fe15b11..9dcfaa4 100644
--- a/code/game/g_client.c
+++ b/code/game/g_client.c
@@ -923,7 +923,7 @@ char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) {
// we don't check password for bots and local client
// NOTE: local client <-> "ip" "localhost"
// this means this client is not running in our current process
- if ( !( ent->r.svFlags & SVF_BOT ) && (strcmp(value, "localhost") != 0)) {
+ if ( !isBot && (strcmp(value, "localhost") != 0)) {
// check for a password
value = Info_ValueForKey (userinfo, "password");
if ( g_password.string[0] && Q_stricmp( g_password.string, "none" ) &&
@@ -1324,6 +1324,16 @@ void ClientDisconnect( int clientNum ) {
ClientUserinfoChanged( level.sortedClients[0] );
}
+ if( g_gametype.integer == GT_TOURNAMENT &&
+ ent->client->sess.sessionTeam == TEAM_FREE &&
+ level.intermissiontime ) {
+
+ trap_SendConsoleCommand( EXEC_APPEND, "map_restart 0\n" );
+ level.restarted = qtrue;
+ level.changemap = NULL;
+ level.intermissiontime = 0;
+ }
+
trap_UnlinkEntity (ent);
ent->s.modelindex = 0;
ent->inuse = qfalse;
diff --git a/code/game/g_main.c b/code/game/g_main.c
index d292da1..eed1d81 100644
--- a/code/game/g_main.c
+++ b/code/game/g_main.c
@@ -1021,6 +1021,8 @@ or moved to a new level based on the "nextmap" cvar
void ExitLevel (void) {
int i;
gclient_t *cl;
+ char nextmap[MAX_STRING_CHARS];
+ char d1[MAX_STRING_CHARS];
//bot interbreeding
BotInterbreedEndMatch();
@@ -1038,8 +1040,16 @@ void ExitLevel (void) {
return;
}
+ trap_Cvar_VariableStringBuffer( "nextmap", nextmap, sizeof(nextmap) );
+ trap_Cvar_VariableStringBuffer( "d1", d1, sizeof(d1) );
+
+ if( !Q_stricmp( nextmap, "map_restart 0" ) && Q_stricmp( d1, "" ) ) {
+ trap_Cvar_Set( "nextmap", "vstr d2" );
+ trap_SendConsoleCommand( EXEC_APPEND, "vstr d1\n" );
+ } else {
+ trap_SendConsoleCommand( EXEC_APPEND, "vstr nextmap\n" );
+ }
- trap_SendConsoleCommand( EXEC_APPEND, "vstr nextmap\n" );
level.changemap = NULL;
level.intermissiontime = 0;
@@ -1436,7 +1446,12 @@ void CheckTournament( void ) {
if ( level.warmupTime < 0 ) {
if ( level.numPlayingClients == 2 ) {
// fudge by -1 to account for extra delays
- level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
+ if ( g_warmup.integer > 1 ) {
+ level.warmupTime = level.time + ( g_warmup.integer - 1 ) * 1000;
+ } else {
+ level.warmupTime = 0;
+ }
+
trap_SetConfigstring( CS_WARMUP, va("%i", level.warmupTime) );
}
return;