Ejemplo n.º 1
0
void CLQ2_FixUpGender() {
	if ( clq2_gender_auto->value ) {

		if ( clq2_gender->modified ) {
			// was set directly, don't override the user
			clq2_gender->modified = false;
			return;
		}

		char sk[ 80 ];
		String::NCpy( sk, clq2_skin->string, sizeof ( sk ) - 1 );
		char* p;
		if ( ( p = strchr( sk, '/' ) ) != NULL ) {
			*p = 0;
		}
		if ( String::ICmp( sk, "male" ) == 0 || String::ICmp( sk, "cyborg" ) == 0 ) {
			Cvar_SetLatched( "gender", "male" );
		} else if ( String::ICmp( sk, "female" ) == 0 || String::ICmp( sk, "crackhor" ) == 0 ) {
			Cvar_SetLatched( "gender", "female" );
		} else {
			Cvar_SetLatched( "gender", "none" );
		}
		clq2_gender->modified = false;
	}
}
Ejemplo n.º 2
0
void PBCvar_Set(const char* name, const char* value)
{
    if(Cvar_FindVar( name ))
    {
	Cvar_SetLatched(name, value);
    }
}
Ejemplo n.º 3
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f( void ) {
	char		*cmd;
	char		*map;
	qboolean	killBots, cheat;
	char		expanded[MAX_QPATH];
	char		mapname[MAX_QPATH];
	int			i;
	client_t	*cl;
	cvar_t      *gametype;

	map = Cmd_Argv(1);
	if ( !map ) {
		return;
	}
	// force latched values to get set// patch DM on BR: if there is a BR map without a DM variant, you still can call for "dm_..."
	gametype = Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	if(map && map[0] && map[1]){
		if(map[2] == '_'){
			char gt[4];
			gt[0] = map[0];
			gt[1] = map[1];
			gt[2] = map[2];
			gt[3] = '\0';

			if(!Q_stricmp(gt,"dm_")){
				if (gametype->integer==GT_BR) {
					Com_sprintf (expanded, sizeof(expanded), "maps/%s.bsp", map);
					expanded[5]='b';
					expanded[6]='r';
					if ( !(FS_ReadFile (expanded, NULL) == -1) ) {
						map[0]='b';
						map[1]='r';
					}
				}
			}
		}
	}

	// make sure the level exists before trying to change, so that
	// a typo at the server console won't end the game
	Com_sprintf (expanded, sizeof(expanded), "maps/%s.bsp", map);
	if ( FS_ReadFile (expanded, NULL) == -1 ) {
		Com_Printf ("Can't find map %s\n", expanded);
		return;
	}

	// force latched values to get set
	Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	cmd = Cmd_Argv(0);
	if( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
		Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
		Cvar_SetValue( "g_doWarmup", 0 );
		// may not set sv_maxclients directly, always set latched
		Cvar_SetLatched( "sv_maxclients", "8" );
		cmd += 2;
		if (!Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
		} else {
			cheat = qfalse;
		}
		killBots = qtrue;
	}
	else {
		if ( !Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
			killBots = qtrue;
		} else {
			cheat = qfalse;
			killBots = qfalse;
		}
		if( sv_gametype->integer == GT_SINGLE_PLAYER ) {
			Cvar_SetValue( "g_gametype", GT_FFA );
		}
	}

	if (sv_autorecord->integer && svs.initialized) {// patch demos: stop server-side demo recording when sv_autrecord is set
		for (i=0, cl = svs.clients ; i < sv_maxclients->integer ; i++, cl++) {
			if (cl->state >= CS_CONNECTED && cl->demorecording) {
				CL_StopRecord( cl );
			}
		}
	}

	// save the map name here cause on a map restart we reload the q3config.cfg
	// and thus nuke the arguments of the map command
	Q_strncpyz(mapname, map, sizeof(mapname));

	// start up the map
	SV_SpawnServer( mapname, killBots );

	// set the cheat value
	// if the level was started with "map <levelname>", then
	// cheats will not be allowed.  If started with "devmap <levelname>"
	// then cheats will be allowed
	if ( cheat ) {
		Cvar_Set( "sv_cheats", "1" );
	} else {
		Cvar_Set( "sv_cheats", "0" );
	}
}
Ejemplo n.º 4
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f( void ) {
	char		*cmd;
	char		*map;
	qboolean	killBots, cheat;
	char		expanded[MAX_QPATH];
	char		mapname[MAX_QPATH];

	map = Cmd_Argv(1);
	if ( !map ) {
		return;
	}

	// make sure the level exists before trying to change, so that
	// a typo at the server console won't end the game
	Com_sprintf (expanded, sizeof(expanded), "maps/%s.bsp", map);
	if ( FS_ReadFile (expanded, NULL) == -1 ) {
		Com_Printf ("Can't find map %s\n", expanded);
		return;
	}

	// force latched values to get set
	Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	cmd = Cmd_Argv(0);
	if( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
		Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
		Cvar_SetValue( "g_doWarmup", 0 );
		// may not set sv_maxclients directly, always set latched
		Cvar_SetLatched( "sv_maxclients", "8" );
		cmd += 2;
		if (!Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
		} else {
			cheat = qfalse;
		}
		killBots = qtrue;
	}
	else {
		if ( !Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
			killBots = qtrue;
		} else {
			cheat = qfalse;
			killBots = qfalse;
		}
		if( sv_gametype->integer == GT_SINGLE_PLAYER ) {
			Cvar_SetValue( "g_gametype", GT_FFA );
		}
	}

	// save the map name here cause on a map restart we reload the q3config.cfg
	// and thus nuke the arguments of the map command
	Q_strncpyz(mapname, map, sizeof(mapname));

	// start up the map
	SV_SpawnServer( mapname, killBots );

	// set the cheat value
	// if the level was started with "map <levelname>", then
	// cheats will not be allowed.  If started with "devmap <levelname>"
	// then cheats will be allowed
	if ( cheat ) {
		Cvar_Set( "sv_cheats", "1" );
	} else {
		Cvar_Set( "sv_cheats", "0" );
	}
}
Ejemplo n.º 5
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f( void ) {
	char        *cmd;
	char        *map;
	char mapname[MAX_QPATH];
	qboolean killBots, cheat;
	char expanded[MAX_QPATH];
	// TTimo: unused
//	int			savegameTime = -1;

	map = Cmd_Argv( 1 );
	if ( !map ) {
		return;
	}

	// make sure the level exists before trying to change, so that
	// a typo at the server console won't end the game
	Com_sprintf( expanded, sizeof( expanded ), "maps/%s.bsp", map );
	if ( FS_ReadFile( expanded, NULL ) == -1 ) {
		Com_Printf( "Can't find map %s\n", expanded );
		return;
	}

	Cvar_Set( "gamestate", va( "%i", GS_INITIALIZE ) );       // NERVE - SMF - reset gamestate on map/devmap
	Cvar_Set( "savegame_loading", "0" );  // make sure it's turned off

	Cvar_Set( "g_currentRound", "0" );            // NERVE - SMF - reset the current round
	Cvar_Set( "g_nextTimeLimit", "0" );           // NERVE - SMF - reset the next time limit

	// force latched values to get set
	// DHM - Nerve :: default to GT_WOLF
	Cvar_Get( "g_gametype", "5", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	// Rafael gameskill
	Cvar_Get( "g_gameskill", "3", CVAR_SERVERINFO | CVAR_LATCH );
	// done

	cmd = Cmd_Argv( 0 );
	if ( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
		Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
		Cvar_SetValue( "g_doWarmup", 0 );
		// may not set sv_maxclients directly, always set latched
#ifdef __MACOS__
		Cvar_SetLatched( "sv_maxclients", "16" ); //DAJ HOG
#else
		Cvar_SetLatched( "sv_maxclients", "32" ); // Ridah, modified this
#endif
		cmd += 2;
		killBots = qtrue;
		if ( !Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
		} else {
			cheat = qfalse;
		}
	} else {
		if ( !Q_stricmp( cmd, "devmap" ) ) {
			cheat = qtrue;
			killBots = qtrue;
		} else {
			cheat = qfalse;
			killBots = qfalse;
		}
		if ( sv_gametype->integer == GT_SINGLE_PLAYER ) {
			Cvar_SetValue( "g_gametype", GT_FFA );
		}
	}

	// save the map name here cause on a map restart we reload the q3config.cfg
	// and thus nuke the arguments of the map command
	Q_strncpyz( mapname, map, sizeof( mapname ) );

	// start up the map
	SV_SpawnServer( mapname, killBots );

	// set the cheat value
	// if the level was started with "map <levelname>", then
	// cheats will not be allowed.  If started with "devmap <levelname>"
	// then cheats will be allowed
	if ( cheat ) {
		Cvar_Set( "sv_cheats", "1" );
	} else {
		Cvar_Set( "sv_cheats", "0" );
	}
}
Ejemplo n.º 6
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f(void) {

    char      *cmd;
    char      *searchmap;
    char      mapname[MAX_QPATH];
    qboolean  killBots, cheat;

    if (Cmd_Argc() < 2) {
        return;
    }

    searchmap = SV_GetMapSoundingLike(Cmd_Argv(1));
    if (!searchmap) {
        return;
    }

    // force latched values to get set
    Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH);

    cmd = Cmd_Argv(0);
    if (Q_stricmpn(cmd, "sp", 2) == 0) {
        Cvar_SetValue("g_gametype", GT_SINGLE_PLAYER);
        Cvar_SetValue("g_doWarmup", 0);
        // may not set sv_maxclients directly, always set latched
        Cvar_SetLatched("sv_maxclients", "8");
        cmd += 2;
        cheat = qfalse;
        killBots = qtrue;
    }
    else {

        if (!Q_stricmp( cmd, "devmap") || !Q_stricmp(cmd, "spdevmap") ) {
            cheat = qtrue;
            killBots = qtrue;
        } else {
            cheat = qfalse;
            killBots = qfalse;
        }

        if (sv_gametype->integer == GT_SINGLE_PLAYER) {
            Cvar_SetValue("g_gametype", GT_FFA);
        }

    }

    // save the map name here cause on a map restart we reload the q3config.cfg
    // and thus nuke the arguments of the map command
    Q_strncpyz(mapname, searchmap, sizeof(mapname));

    // start up the map
    SV_SpawnServer(mapname, killBots);

    // set the cheat value
    // if the level was started with "map <levelname>", then
    // cheats will not be allowed.  If started with "devmap <levelname>"
    // then cheats will be allowed
    if (cheat) {
        Cvar_Set("sv_cheats", "1");
    } else {
        Cvar_Set("sv_cheats", "0");
    }

}
Ejemplo n.º 7
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f( void ) {
	char		*cmd;
	char		*map;
	qboolean	killBots, cheat;
	char		expanded[MAX_QPATH];
	char		mapname[MAX_QPATH];

#ifdef _XBOX
	ClientManager::SetMainClient(0);
	ClientManager::ActivateClient(0);
#endif

	map = Cmd_Argv(1);
	if ( !map ) {
		return;
	}

	// make sure the level exists before trying to change, so that
	// a typo at the server console won't end the game
	if (strchr (map, '\\') ) {
		Com_Printf ("Can't have mapnames with a \\\n");
		return;
	}

#ifndef _XBOX
	Com_sprintf (expanded, sizeof(expanded), "maps/%s.bsp", map);
	if ( FS_ReadFile (expanded, NULL) == -1 ) {
		Com_Printf ("Can't find map %s\n", expanded);
		return;
	}
#endif

	// force latched values to get set
	Cvar_Get ("g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	cmd = Cmd_Argv(0);
	if( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
		Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
		Cvar_SetValue( "g_doWarmup", 0 );
		// may not set sv_maxclients directly, always set latched
		Cvar_SetLatched( "sv_maxclients", "8" );
		cmd += 2;
		cheat = qfalse;
		killBots = qtrue;
	}
	else {
		if ( !Q_stricmpn( cmd, "devmap",6 ) || !Q_stricmp( cmd, "spdevmap" ) ) {
			cheat = qtrue;
			killBots = qtrue;
		} else {
			cheat = qfalse;
			killBots = qfalse;
		}
		/*
		if( sv_gametype->integer == GT_SINGLE_PLAYER ) {
			Cvar_SetValue( "g_gametype", GT_FFA );
		}
		*/
	}

	// save the map name here cause on a map restart we reload the jampconfig.cfg
	// and thus nuke the arguments of the map command
	Q_strncpyz(mapname, map, sizeof(mapname));

	ForceReload_e eForceReload = eForceReload_NOTHING;	// default for normal load

//	if ( !Q_stricmp( cmd, "devmapbsp") ) {	// not relevant in MP codebase
//		eForceReload = eForceReload_BSP;
//	}
//	else
	if ( !Q_stricmp( cmd, "devmapmdl") ) {
		eForceReload = eForceReload_MODELS;
	}
	else
	if ( !Q_stricmp( cmd, "devmapall") ) {
		eForceReload = eForceReload_ALL;
	}

	// start up the map
	SV_SpawnServer( mapname, killBots, eForceReload );

	// set the cheat value
	// if the level was started with "map <levelname>", then
	// cheats will not be allowed.  If started with "devmap <levelname>"
	// then cheats will be allowed
	if ( cheat ) {
		Cvar_Set( "sv_cheats", "1" );
	} else {
		Cvar_Set( "sv_cheats", "0" );
	}
}
Ejemplo n.º 8
0
/*
==================
SV_Map_f

Restart the server on a different map
==================
*/
static void SV_Map_f( void ) {
	char		*cmd;
	char		*map;
	qboolean	killBots, cheat;
	char		expanded[MAX_QPATH];
	char		mapname[MAX_QPATH];
//muff
	qboolean	ent_or = qfalse;
	char		*ent_buffer;
	char		*ent_map_name;
	char		*ent_file_name;
	char		*map_file_name;
	char		ent_expanded[MAX_QPATH];
//-muff

	map_file_name = Cmd_Argv(1);
	//COM_StripExtension( map_file_name, map_file_name, sizeof(map_file_name) );

	if ( !map_file_name ) {
		//Com_Printf( "Usage: %s <map name>", Cmd_Argv(0) );
		Com_xPrintf("Usage", va("%s", Cmd_Argv(0)), "<map name>");
		return;
	}

	map = map_file_name;

	// make sure the level exists before trying to change, so that
	// a typo at the server console won't end the game
/*
	// muff: first search for entity override
	ent_map_name = "";
	ent_file_name = "";
	Com_sprintf( ent_expanded, sizeof(ent_expanded), "maps/%s.ent", map );
	if ( FS_ReadFile(ent_expanded, (void **)ent_buffer) != -1 ) {
		const char	*s;	// = strstr( ent_buffer, "mapname" );
		int			i;

		// read associated map name in override, if any
		for ( i = 0 ; ent_buffer[i] != '\0' ; i++ ) {
			if ( ent_buffer[i] == '{' ) break;

			if ( strstr(&ent_buffer[i], "mapname") == &ent_buffer[i] ) {
				qboolean opened = qfalse;
				i += strlen("mapname") - 1;

				for ( i = 0; ent_buffer[i] != '\0'; i++ ) {
					if ( ent_buffer[i] == '{' ) break;
					if ( ent_buffer[i] == ' ' ) continue;

					if ( ent_buffer[i] == '"' ) {
						if ( !opened ) {
							opened = qtrue;
							continue;
						} else break;
					}
					*ent_map_name = ent_buffer[i];
					*ent_map_name++;
				}
			}
		}
		// revert to reference map
		if ( ent_map_name ) {
			ent_file_name = map;

			map = ent_map_name;
			ent_or = qtrue;
		}
	}
*/

	Com_sprintf( expanded, sizeof(expanded), "maps/%s.bsp", map );
	if ( FS_ReadFile(expanded, NULL) == -1 ) {
		Com_Printf( "Can't find map %s\n", expanded );
		return;
	}

//muff: set entity override state
	if ( ent_or ) {
		sv.ent_or = ent_file_name;
		sv.do_ent_or = qtrue;
	}
//-muff

	// force latched values to get set
	Cvar_Get( "g_gametype", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH );

	cmd = Cmd_Argv(0);
	if ( Q_stricmpn( cmd, "sp", 2 ) == 0 ) {
		Cvar_SetValue( "g_gametype", GT_SINGLE_PLAYER );
		Cvar_SetValue( "g_doWarmup", 0 );
		// may not set sv_maxclients directly, always set latched
		Cvar_SetLatched( "sv_maxclients", "16" );
		cmd += 2;
		if (!Q_stricmp(cmd, "devmap") ) {
			cheat = qtrue;
		} else {
			cheat = qfalse;
		}
		killBots = qtrue;
	} else {
		if ( !Q_stricmp(cmd, "devmap") ) {
			cheat = qtrue;
			killBots = qtrue;
		} else {
			cheat = qfalse;
			killBots = qfalse;
		}
		if ( sv_gametype->integer == GT_SINGLE_PLAYER ) {
			Cvar_SetValue( "g_gametype", GT_FFA );
		}
	}

	// save the map name here cause on a map restart we reload the q3config.cfg
	// and thus nuke the arguments of the map command
	Q_strncpyz( mapname, map_file_name, sizeof(mapname) );

	// start up the map
	SV_SpawnServer( mapname, killBots );

	// set the cheat value
	// if the level was started with "map <levelname>", then
	// cheats will not be allowed.  If started with "devmap <levelname>"
	// then cheats will be allowed
	Cvar_Set( "sv_cheats", cheat ? "1" : "0" );
}
Ejemplo n.º 9
0
/*
==================
CL_ParseServerData
==================
*/
qboolean CL_ParseServerData (sizebuf_t *msg)
{
	char	*str;
	int		i;
	
	Com_DPrintf ("Serverdata packet received.\n");
//
// wipe the client_state_t struct
//
	CL_ClearState ();
	cls.state = ca_connected;

// parse protocol version number
	i = MSG_ReadLong (msg);
	cls.serverProtocol = i;

	cl.servercount = MSG_ReadLong (msg);
	cl.attractloop = MSG_ReadByte (msg);

	if (cl.attractloop) {
		//cls.serverProtocol = PROTOCOL_VERSION_DEFAULT;
	}
	else if (i != PROTOCOL_VERSION_DEFAULT && i != PROTOCOL_VERSION_R1Q2) {
		Com_Error (ERR_DROP, "Server is using unknown protocol %d.", i);
	}

	// game directory
	str = MSG_ReadString (msg);
	Q_strncpyz (cl.gamedir, str, sizeof(cl.gamedir));
	str = cl.gamedir;

	// set gamedir
	if (!Com_ServerState()) {
		Cvar_SetLatched("game", str);
		if( FS_NeedRestart() ) {
			CL_RestartFilesystem(true);
		}
	}

	// parse player entity number
	cl.playernum = MSG_ReadShort (msg);

	// get the full level name
	str = MSG_ReadString (msg);

	cl.pmp.strafeHack = false;
	cl.pmp.speedMultiplier = 1;
	cl.pmp.airaccelerate = 0;
	cls.protocolVersion = 0;

	if (cls.serverProtocol == PROTOCOL_VERSION_R1Q2)
	{
		i = MSG_ReadByte(msg);
		if( i ) {
			Com_Printf("'Enhanced' R1Q2 servers are not supported, falling back to protocol 34.\n" );
			CL_Disconnect();		
			cls.serverProtocol = PROTOCOL_VERSION_DEFAULT;
			CL_Reconnect_f ();
			return false;
		}
		i = MSG_ReadShort(msg);
		if (i < PROTOCOL_VERSION_R1Q2_MINIMUM || i > PROTOCOL_VERSION_R1Q2_CURRENT)
		{
			if (cl.attractloop)
			{
				if ( i < PROTOCOL_VERSION_R1Q2_MINIMUM )
					Com_Printf("This demo was recorded with an earlier version of the R1Q2 protocol. It may not play back properly.\n");
				else
					Com_Printf("This demo was recorded with a later version of the R1Q2 protocol. It may not play back properly.\n");
			}
			else
			{
				if( i < PROTOCOL_VERSION_R1Q2_MINIMUM ) {
					Com_Printf("Server uses OLDER minor R1Q2 protocol version than minimum supported (%i < %i), falling back to protocol 34.\n", i, PROTOCOL_VERSION_R1Q2_MINIMUM);
					CL_Disconnect();
					cls.serverProtocol = PROTOCOL_VERSION_DEFAULT;
					CL_Reconnect_f ();
					return false;
				}
				Com_Printf("Server uses NEWER minor R1Q2 protocol version (%i > %i), some features will be unavailable.\n", i, PROTOCOL_VERSION_R1Q2_CURRENT);
			}
		}

		if (i >= 1903) {
			MSG_ReadByte(msg);
			cl.pmp.strafeHack = MSG_ReadByte(msg);
		}

		cl.pmp.speedMultiplier = 2;
		cls.protocolVersion = i;
	}


	if (cl.playernum == -1)
	{	// playing a cinematic or showing a pic, not a level
		SCR_PlayCinematic (str);
	}
	else
	{
		// seperate the printfs so the server message can have a color
		Com_Printf("\n\n\35\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\36\37\n\n");
		Com_Printf ("%c%s\n", 2, str);

		// need to prep refresh at next oportunity
		cl.refresh_prepped = false;

        if((unsigned)cl.playernum >= MAX_CLIENTS) {
            cl.playernum = ( MAX_CLIENTS - 1 );
        }
	}

	return true;
}
Ejemplo n.º 10
0
void StartServerActionFunc( void *self )
{
	char	startmap[1024];
	int		timelimit;
	int		fraglimit;
	int		maxclients;
	char	*spot;

//	strcpy( startmap, strchr( mapnames[maplist.curvalue], '\n' ) + 1 );
	strcpy( startmap, mapnames[maplist.curvalue]);

	maxclients  = atoi( s_maxclients_field.buffer );
	timelimit	= atoi( s_timelimit_field.buffer );
	fraglimit	= atoi( s_fraglimit_field.buffer );

	Cvar_SetLatched( "maxclients", va("%i", (int)ClampCvar( 0, maxclients, maxclients )) );
	Cvar_SetValue ("timelimit", ClampCvar( 0, timelimit, timelimit ) );
	Cvar_SetValue ("fraglimit", ClampCvar( 0, fraglimit, fraglimit ) );
	Cvar_Set("hostname", s_hostname_field.buffer );
//	Cvar_SetValue ("deathmatch", !s_rules_box.curvalue );
//	Cvar_SetValue ("coop", s_rules_box.curvalue );

//PGM
	if((s_rules_box.curvalue < 2) || (Developer_searchpath() != 2))
	{
		Cvar_SetLatched ("deathmatch", s_rules_box.curvalue ? "0" : "1");
		Cvar_SetLatched ("coop", s_rules_box.curvalue ? "1" : "0" );
		Cvar_SetValue ("gamerules", 0 );
	}
	else
	{
		Cvar_SetLatched ("deathmatch", "1");	// deathmatch is always true for rogue games, right?
		Cvar_SetLatched ("coop", "0");			// FIXME - this might need to depend on which game we're running
		Cvar_SetValue ("gamerules", s_rules_box.curvalue);
	}
//PGM

	spot = NULL;
	if (s_rules_box.curvalue == 1)		// PGM
	{
 		if(Q_stricmp(startmap, "bunk1") == 0)
  			spot = "start";
 		else if(Q_stricmp(startmap, "mintro") == 0)
  			spot = "start";
 		else if(Q_stricmp(startmap, "fact1") == 0)
  			spot = "start";
 		else if(Q_stricmp(startmap, "power1") == 0)
  			spot = "pstart";
 		else if(Q_stricmp(startmap, "biggun") == 0)
  			spot = "bstart";
 		else if(Q_stricmp(startmap, "hangar1") == 0)
  			spot = "unitstart";
 		else if(Q_stricmp(startmap, "city1") == 0)
  			spot = "unitstart";
 		else if(Q_stricmp(startmap, "boss1") == 0)
			spot = "bosstart";
	}

	if (spot)
	{
		if (Com_ServerState())
			Cbuf_AddText ("disconnect\n");
		Cbuf_AddText (va("gamemap \"*%s$%s\"\n", startmap, spot));
	}
	else
	{
		Cbuf_AddText (va("map %s\n", startmap));
	}

	M_ForceMenuOff ();
}