string GetMapname();
string GetGametype();
void GotoNextMap(float reinit);
-void ShuffleMaplist()
+void ShuffleMaplist();
float(float reinit) DoNextMapOverride;
void SetDefaultAlpha()
self.classname = "worldspawn"; // safeguard against various stuff ;)
// needs to be done so early because of the constants they create
- RegisterWeapons();
- RegisterGametypes();
+ CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+ CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
MapInfo_Enumerate();
MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
void Map_MarkAsRecent(string m);
float world_already_spawned;
-void RegisterWeapons();
void Nagger_Init();
void ClientInit_Spawn();
void WeaponStats_Init();
compressShortVector_init();
- allowed_to_spawn = TRUE;
-
entity head;
head = nextent(world);
maxclients = 0;
}
// needs to be done so early because of the constants they create
- RegisterWeapons();
- RegisterGametypes();
+ CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+ CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
- if(g_ca || g_freezetag)
+ if(g_ca)
{
addstat(STAT_REDALIVE, AS_INT, redalive_stat);
addstat(STAT_BLUEALIVE, AS_INT, bluealive_stat);
- addstat(STAT_YELLOWALIVE, AS_INT, yellowalive_stat);
- addstat(STAT_PINKALIVE, AS_INT, pinkalive_stat);
- }
- if(g_freezetag)
- {
- addstat(STAT_FROZEN, AS_INT, freezetag_frozen);
- addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, freezetag_revive_progress);
}
// g_movementspeed hack
addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
-
+
// secrets
addstat(STAT_SECRETS_TOTAL, AS_FLOAT, stat_secrets_total);
addstat(STAT_SECRETS_FOUND, AS_FLOAT, stat_secrets_found);
-
+
+ // misc
+ addstat(STAT_RESPAWN_TIME, AS_FLOAT, stat_respawn_time);
+
next_pingtime = time + 5;
detect_maptype();
-
+
// set up information replies for clients and server to use
lsmaps_reply = "^7Maps available: ";
lsnewmaps_reply = "^7Maps without a record set: ";
col = "^2";
else
col = "^3";
-
+
++j;
-
+
lsmaps_reply = strcat(lsmaps_reply, col, MapInfo_Map_bspname, " ");
-
+
if(g_race && !stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, RACE_RECORD, "time"))))
lsnewmaps_reply = strcat(lsnewmaps_reply, col, MapInfo_Map_bspname, " ");
else if(g_cts && !stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, CTS_RECORD, "time"))))
lsnewmaps_reply = strcat(lsnewmaps_reply, col, MapInfo_Map_bspname, " ");
}
}
-
+
lsmaps_reply = strzone(strcat(lsmaps_reply, "\n"));
lsnewmaps_reply = strzone(strcat(((!g_race && !g_cts) ? "Need to be playing race or CTS for lsnewmaps to work." : lsnewmaps_reply), "\n"));
for(i = 0; i < 10; ++i)
{
- records_reply[i] = strzone(getrecords(i));
+ s = getrecords(i);
+ if (s)
+ records_reply[i] = strzone(s);
}
-
+
ladder_reply = strzone(getladder());
rankings_reply = strzone(getrankings());
void IntermissionThink()
{
FixIntermissionClient(self);
-
+
float server_screenshot = (autocvar_sv_autoscreenshot && self.cvar_cl_autoscreenshot);
float client_screenshot = (self.cvar_cl_autoscreenshot == 2);
-
+
if( (server_screenshot || client_screenshot)
&& ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) )
{
if(autocvar_g_campaign)
CampaignPreIntermission();
+ MUTATOR_CALLHOOK(MatchEnd);
+
localcmd("\nsv_hook_gameend\n");
}
return WINNING_STARTSUDDENDEATHOVERTIME;
else
return WINNING_NEVER;
- return wc;
}
float WinningCondition_QualifyingThenRace(float limit)
if(mapvote_initialized)
return "Can't suggest - voting is already in progress!";
m = MapInfo_FixName(m);
- if(!m)
+ if not(m)
return "The map you suggested is not available on this server.";
if(!autocvar_g_maplist_votable_suggestions_override_mostrecent)
if(Map_IsRecent(m))