main(){if(getdvar("mapname")=="mp_background")return;maps\mp\gametypes\_globallogic::init();maps\mp\gametypes\_callbacksetup::SetupCallbacks();maps\mp\gametypes\_globallogic::SetupCallbacks();level.teamBased=true;level.onStartGameType=::onStartGameType;level.onSpawnPlayer=::onSpawnPlayer;level.onRoundSwitch=::onRoundSwitch;}onStartGameType(){setClientNameMode("auto_change");maps\mp\gametypes\_globallogic::setObjectiveText("allies",&"OBJECTIVES_WAR");maps\mp\gametypes\_globallogic::setObjectiveText("axis",&"OBJECTIVES_WAR");maps\mp\gametypes\_globallogic::setObjectiveScoreText("allies",&"OBJECTIVES_WAR_SCORE");maps\mp\gametypes\_globallogic::setObjectiveScoreText("axis",&"OBJECTIVES_WAR_SCORE");maps\mp\gametypes\_globallogic::setObjectiveHintText("allies",&"OBJECTIVES_WAR_HINT");maps\mp\gametypes\_globallogic::setObjectiveHintText("axis",&"OBJECTIVES_WAR_HINT");level.spawnMins=(0,0,0);level.spawnMaxs=(0,0,0);maps\mp\gametypes\_spawnlogic::placeSpawnPoints("mp_tdm_spawn_allies_start");maps\mp\gametypes\_spawnlogic::placeSpawnPoints("mp_tdm_spawn_axis_start");maps\mp\gametypes\_spawnlogic::addSpawnPoints("allies","mp_tdm_spawn");maps\mp\gametypes\_spawnlogic::addSpawnPoints("axis","mp_tdm_spawn");level.mapCenter=maps\mp\gametypes\_spawnlogic::findBoxCenter(level.spawnMins,level.spawnMaxs);setMapCenter(level.mapCenter);allowed[0]="war";level.displayRoundEndText=false;maps\mp\gametypes\_gameobjects::main(allowed);if(level.roundLimit!=1&&level.numLives){level.overrideTeamScore=true;level.displayRoundEndText=true;level.onEndGame=::onEndGame;}}onRoundSwitch(){level.halftimeType="halftime";}onSpawnPlayer(){self.usingObj=undefined;if(level.inGracePeriod){spawnPoints=getentarray("mp_tdm_spawn_"+self.pers["team"]+"_start","classname");if(!spawnPoints.size)spawnPoints=getentarray("mp_sab_spawn_"+self.pers["team"]+"_start","classname");if(!spawnPoints.size){spawnPoints=maps\mp\gametypes\_spawnlogic::getTeamSpawnPoints(self.pers["team"]);spawnPoint=maps\mp\gametypes\_spawnlogic::getSpawnpoint_NearTeam(spawnPoints);}else spawnPoint=maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random(spawnPoints);}else{spawnPoints=maps\mp\gametypes\_spawnlogic::getTeamSpawnPoints(self.pers["team"]);spawnPoint=maps\mp\gametypes\_spawnlogic::getSpawnpoint_NearTeam(spawnPoints);}self spawn(spawnPoint.origin,spawnPoint.angles);}onEndGame(winningTeam){if(isdefined(winningTeam)&&(winningTeam=="allies"||winningTeam=="axis"))[[level._setTeamScore]](winningTeam,[[level._getTeamScore]](winningTeam)+1);}