67 e = edict_num(this.
cnt + 1);
79 CS(e).latency_sum +=
CS(e).ping;
80 CS(e).latency_cnt += 1;
145 LOG_INFO(
"Waiting for _sv_init being set to 1 by initialization scripts...");
153 float n, i, adding, pureadding;
160 buf_cvarlist(h,
"",
"_");
166 for(i = 0; i < n; ++i)
168 k = bufstr_get(h, i);
170 #define BADPREFIX(p) if(substring(k, 0, strlen(p)) == p) continue 171 #define BADPRESUFFIX(p,s) if(substring(k, 0, strlen(p)) == p && substring(k, -strlen(s), -1) == s) continue 172 #define BADCVAR(p) if(k == p) continue 173 #define BADVALUE(p, val) if (k == p && v == val) continue 184 BADCVAR(
"sv_mapformat_is_quake2");
185 BADCVAR(
"sv_mapformat_is_quake3");
211 BADCVAR(
"mod_q3bsp_lightmapmergepower");
212 BADCVAR(
"mod_q3bsp_nolightmaps");
230 BADCVAR(
"sv_vote_master_password");
231 BADCVAR(
"sys_colortranslation");
232 BADCVAR(
"sys_specialcharactertranslation");
261 BADCVAR(
"sv_allow_customplayermodels_idlist");
262 BADCVAR(
"sv_allow_customplayermodels_speciallist");
277 BADCVAR(
"g_domination_default_teams");
294 BADCVAR(
"g_race_qualifying_timelimit");
295 BADCVAR(
"g_race_qualifying_timelimit_override");
300 BADCVAR(
"g_survival_not_dm_maps");
309 BADCVAR(
"g_mapinfo_settemp_acl");
310 BADCVAR(
"g_mapinfo_ignore_warnings");
311 BADCVAR(
"g_maplist_ignore_sizes");
312 BADCVAR(
"g_maplist_sizes_count_bots");
317 BADCVAR(
"g_maplist_mostrecent");
330 cvar_changes =
"// too many settings have been changed to show them here\n";
338 BADCVAR(
"captureleadlimit_override");
339 BADCVAR(
"condump_stripcolors");
342 BADCVAR(
"g_allow_oldvortexbeam");
343 BADCVAR(
"g_balance_kill_delay");
344 BADCVAR(
"g_buffs_pickup_anyway");
346 BADCVAR(
"g_buffs_randomize_teamplay");
347 BADCVAR(
"g_campcheck_distance");
349 BADCVAR(
"g_ca_point_leadlimit");
351 BADCVAR(
"g_ca_spectate_enemies");
352 BADCVAR(
"g_ctf_captimerecord_always");
353 BADCVAR(
"g_ctf_flag_glowtrails");
354 BADCVAR(
"g_ctf_dynamiclights");
355 BADCVAR(
"g_ctf_flag_pickup_verbosename");
356 BADCVAR(
"g_ctf_flagcarrier_auto_helpme_damage");
359 BADCVAR(
"g_domination_point_leadlimit");
361 BADCVAR(
"g_freezetag_point_leadlimit");
362 BADCVAR(
"g_freezetag_point_limit");
366 BADCVAR(
"g_invasion_point_limit");
368 BADCVAR(
"g_keepaway_ballcarrier_effects");
369 BADCVAR(
"g_keepawayball_effects");
370 BADCVAR(
"g_keyhunt_point_leadlimit");
371 BADCVAR(
"g_nexball_goalleadlimit");
372 BADCVAR(
"g_new_toys_autoreplace");
373 BADCVAR(
"g_new_toys_use_pickupsound");
374 BADCVAR(
"g_physics_predictall");
376 BADCVAR(
"g_playerclip_collisions");
377 BADCVAR(
"g_spawn_alloweffects");
378 BADCVAR(
"g_tdm_point_leadlimit");
380 BADCVAR(
"leadlimit_and_fraglimit");
384 BADCVAR(
"sv_checkforpacketsduringsleep");
387 BADCVAR(
"sv_intermission_cdtrack");
391 BADCVAR(
"sv_precacheplayermodels");
396 BADCVAR(
"sv_weapons_modeloverride");
432 BADCVAR(
"capturelimit_override");
437 BADCVAR(
"g_balance_teams_prevent_imbalance");
438 BADCVAR(
"g_balance_teams_scorefactor");
439 BADCVAR(
"g_ban_sync_trusted_servers");
442 BADCVAR(
"g_ca_teams_override");
443 BADCVAR(
"g_ctf_fullbrightflags");
446 BADCVAR(
"g_domination_point_limit");
447 BADCVAR(
"g_domination_teams_override");
448 BADCVAR(
"g_freezetag_revive_spawnshield");
449 BADCVAR(
"g_freezetag_teams_override");
452 BADCVAR(
"g_fullbrightplayers");
453 BADCVAR(
"g_keyhunt_point_limit");
454 BADCVAR(
"g_keyhunt_teams_override");
455 BADCVAR(
"g_lms_lives_override");
459 BADCVAR(
"g_nexball_goallimit");
461 BADCVAR(
"g_physics_clientselect");
464 BADCVAR(
"g_powerups_drop_ondeath");
465 BADCVAR(
"g_player_brightness");
467 BADCVAR(
"g_rocket_flying_disabledelays");
471 BADCVAR(
"g_tdm_teams_override");
478 BADCVAR(
"minplayers_per_team");
482 BADCVAR(
"rcon_restricted_commands");
483 BADCVAR(
"rcon_restricted_password");
489 BADCVAR(
"sv_defaultcharacter");
490 BADCVAR(
"sv_defaultcharacterskin");
491 BADCVAR(
"sv_defaultplayercolors");
492 BADCVAR(
"sv_defaultplayermodel");
493 BADCVAR(
"sv_defaultplayerskin");
502 BADCVAR(
"sv_vote_majority_factor");
504 BADCVAR(
"sv_vote_master_commands");
505 BADCVAR(
"sv_vote_master_password");
506 BADCVAR(
"sv_vote_simple_majority_factor");
507 BADVALUE(
"sys_ticrate",
"0.0166667");
508 BADVALUE(
"sys_ticrate",
"0.0333333");
525 BADCVAR(
"g_freezetag_weaponarena");
527 BADCVAR(
"g_ctf_stalemate_time");
539 cvar_purechanges =
"// too many settings have been changed to show them here\n";
553 cvar_changes =
"// this server runs at default server settings\n";
567 WriteHeader(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
599 e =
new(info_player_deathmatch);
602 for (
int i = 0, n = numentityfields(); i < n; ++i) {
603 string k = entityfieldname(i);
604 if (k ==
"classname") {
606 putentityfieldstring(i,
this,
"worldspawn");
647 int done = 0;
for (
int i = 0, n = numentityfields(); i < n; ++i) {
648 string k = entityfieldname(i);
vector v = (k ==
"mins") ? mi_min : (k ==
"maxs") ? mi_max :
'0 0 0';
650 putentityfieldstring(i,
world, sprintf(
"%v", v));
651 if (++done == 2)
break;
665 LOG_INFO(
"The current map contains a potentially harmful fog setting, ignored");
701 bool wantrestart =
false;
708 string expect =
"csprogs.dat";
709 wantrestart =
cvar_string(
"csqc_progname") != expect;
717 string pk3csprogs =
"csprogs-" WATERMARK
".dat";
719 string select =
"csprogs.dat";
720 if (
fexists(pk3csprogs)) select = pk3csprogs;
731 string switchversion =
fgets(sentinel);
733 if (switchversion !=
"" && switchversion != WATERMARK)
735 LOG_INFOF(
"Switching progs: " WATERMARK
" -> %s", switchversion);
739 string newprogs = sprintf(
"progs-%s.dat", switchversion);
745 string newcsprogs = sprintf(
"csprogs-%s.dat", switchversion);
748 cvar_set(
"csqc_progname", newcsprogs);
763 error(
"world already spawned - you may have EXACTLY ONE worldspawn!");
784 lightstyle(1,
"mmnmmommommnonmmonqnmmo");
787 lightstyle(2,
"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
790 lightstyle(3,
"mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
793 lightstyle(4,
"mamamamamama");
796 lightstyle(5,
"jklmnopqrstuvwxyzyxwvutsrqponmlkj");
799 lightstyle(6,
"nmonqnmomnmomomno");
802 lightstyle(7,
"mmmaaaabcdefgmmmmaaaammmaamm");
805 lightstyle(8,
"mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
808 lightstyle(9,
"aaaaaaaazzzzzzzz");
811 lightstyle(10,
"mmamammmmammamamaaamammma");
814 lightstyle(11,
"abcdefghijklmnopqrrqponmlkjihgfedcba");
826 PlayerStats_GameReport_Init();
835 if(warmup_limit == 0)
836 warmup_limit = (autocvar_timelimit > 0) ? autocvar_timelimit * 60 : autocvar_timelimit;
844 WaypointSprite_Init();
858 s =
":gameinfo:mutators:LIST";
865 s =
strcat(s,
":no_use_ammunition");
869 s =
strcat(s,
":no_pickup_items");
871 s =
strcat(s,
":pickup_items");
879 s =
strcat(s,
":norecoil");
908 while((s =
fgets(fd)))
915 string trackname =
argv(2);
916 LOG_INFO(
"Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:");
924 else if(
argv(0) ==
"fog")
926 LOG_INFO(
"Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:");
929 else if(
argv(0) ==
"set")
931 LOG_INFO(
"Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:");
934 else if(
argv(0) !=
"//")
936 LOG_INFO(
"Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:");
952 bool records_available =
false;
953 for(
int i = 0; i < 10; ++i)
959 records_available =
true;
962 if (!records_available)
963 records_reply[0] =
"No records available for the current game mode.\n";
979 string s =
"csprogs-" WATERMARK
".dat";
983 string pkg =
argv(i);
985 if (
endsWith(pkg,
"-serverpackage.txt"))
continue;
986 if (
endsWith(pkg,
".serverpackage"))
continue;
990 #define X(match) MACRO_BEGIN \ 991 int fd = search_begin(match, true, false); \ 994 for (int i = 0, j = search_getsize(fd); i < j; ++i) \ 996 s = cons(s, search_getfilename(fd, i)); \ 1001 X(
"*-serverpackage.txt");
1002 X(
"*.serverpackage");
1004 cvar_set(
"sv_curl_serverpackages", s);
1026 __spawnfunc_spawn_all();
1037 float m = e.dphitcontentsmask;
1038 e.dphitcontentsmask = goodcontents | badcontents;
1041 vector delta = boundmax - boundmin;
1046 for(j = 0; j < attempts; ++j)
1048 start.x = org.x +
random() * delta.x;
1049 start.y = org.y +
random() * delta.y;
1050 start.z = org.z +
random() * delta.z;
1055 tracebox(start, e.mins, e.maxs, start -
'0 0 1' * delta.z,
MOVE_NORMAL, e);
1074 vector mstart = start + 0.5 * (e.mins + e.maxs);
1075 traceline(mstart, mstart +
'1 0 0' * delta.x,
MOVE_NORMAL, e);
1078 traceline(mstart, mstart -
'1 0 0' * delta.x,
MOVE_NORMAL, e);
1081 traceline(mstart, mstart +
'0 1 0' * delta.y,
MOVE_NORMAL, e);
1084 traceline(mstart, mstart -
'0 1 0' * delta.y,
MOVE_NORMAL, e);
1087 traceline(mstart, mstart +
'0 0 1' * delta.z,
MOVE_NORMAL, e);
1103 int items_checked = 0;
1113 if(items_checked >= attempts)
1122 end.x = org.x +
random() * delta.x;
1123 end.y = org.y +
random() * delta.y;
1124 end.z = org.z +
random() * delta.z;
1128 tracebox(start, e.mins, e.maxs, end,
MOVE_NORMAL, e);
1139 if(tracebox_hits_trigger_hurt(start, e.mins, e.maxs, enddown))
1145 e.dphitcontentsmask = m;
1157 float MoveToRandomMapLocation(
entity e,
float goodcontents,
float badcontents,
float badsurfaceflags,
float attempts,
float maxaboveground,
float minviewdistance)
1186 to_eventlog =
false;
1228 s =
strcat(s,
"spectator:");
1231 LOG_HELP(s, playername(it.netname, it.team,
false));
1235 fputs(file,
strcat(s, playername(it.netname, it.team,
false),
"\n"));
1248 for(i = 1; i < 16; ++i)
1267 fputs(file,
":end\n");
1279 game_stopped =
true;
1302 PlayerStats_GameReport(
true);
1312 int winner_team = 0;
1319 winner_team = it.team;
1322 bprint(playername(it.netname, it.team,
false),
" ^7wins\n");
1326 target_music_kill();
1382 if(fraglimitreached)
1391 if(fraglimitreached)
1398 if(fraglimitreached)
1416 if(it.(field) == value)
1435 for (
int i = 1; i < 5; ++i)
1475 fragsleft =
max(fragsleft, leadingfragsleft);
1477 fragsleft =
min(fragsleft, leadingfragsleft);
1483 Send_Notification(NOTIF_ALL,
NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_1);
1484 else if (fragsleft == 2)
1485 Send_Notification(NOTIF_ALL,
NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_2);
1486 else if (fragsleft == 3)
1487 Send_Notification(NOTIF_ALL,
NULL, MSG_ANNCE, ANNCE_REMAINING_FRAG_3);
1499 limit_reached = (fraglimit_reached && leadlimit_reached);
1501 limit_reached = (fraglimit_reached || leadlimit_reached);
1504 WinningConditionHelper_topscore && limit_reached,
1520 for (
int i = 1; i < 5; ++i)
1529 Team_SetTeamScore(Team_GetTeam(it.team), 1);
1537 Team_SetTeamScore(Team_GetTeam(it.team), 1);
1546 if(team1_score + team2_score + team3_score + team4_score == 0)
1551 else if(team1_score + team2_score + team3_score + team4_score == 1)
1556 else if(team2_score)
1558 else if(team3_score)
1609 float timelimit = autocvar_timelimit * 60;
1610 float fraglimit = autocvar_fraglimit;
1611 float leadlimit = autocvar_leadlimit;
1612 if (leadlimit < 0) leadlimit = 0;
1631 timelimit += game_starttime;
1642 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_RACE_FINISHLAP);
1644 Send_Notification(NOTIF_ALL,
NULL, MSG_CENTER, CENTER_OVERTIME_FRAG);
1649 if (timelimit &&
time >= timelimit)
1654 float playerswithlaps;
1656 totalplayers = playerswithlaps = readyplayers = 0;
1667 if(readyplayers || playerswithlaps >= 2)
1689 bprint(
"Hey! Someone ran out of spawns!\n");
1691 checkrules_status =
M_ARGV(0,
float);
1728 bool allow_mutatorblocked =
false;
1730 if(!weaponinfo.m_id)
1733 bool mutator_returnvalue =
MUTATOR_CALLHOOK(WantWeapon, weaponinfo, d, allguns, allow_mutatorblocked);
1735 allguns =
M_ARGV(2,
bool);
1736 allow_mutatorblocked =
M_ARGV(3,
bool);
1740 else if(!mutator_returnvalue)
1741 d = !(!weaponinfo.weaponstart);
1746 float t = weaponinfo.weaponstartoverride;
1766 FOREACH(Weapons, it != WEP_Null, {
1777 FOREACH(Weapons, it != WEP_Null, {
1787 FOREACH(Weapons, it != WEP_Null,
1797 FOREACH(Weapons, it != WEP_Null, {
1806 if (weaponsInMapAll)
1819 if (weaponsInMapAll)
1832 if (weaponsInMapAll)
1870 if (s ==
"0" || s ==
"")
1874 else if (s ==
"off")
1878 else if (s ==
"all" || s ==
"1")
1884 else if (s ==
"devall")
1890 else if (s ==
"most")
1896 else if (s ==
"all_available")
1904 else if (s ==
"devall_available")
1912 else if (s ==
"most_available")
1920 else if (s ==
"none")
1930 for (
int j = 0; j < t; ++j)
1947 start_items |= IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS;
1951 FOREACH(Weapons, it != WEP_Null, {
1963 if(
cvar(
"g_balance_superweapons_time") < 0)
1966 if(!
cvar(
"g_use_ammunition"))
2019 FOREACH(Weapons, it != WEP_Null, {
2065 if(
cvar(
"sv_allow_fullbright"))
2071 warmup_limit =
cvar(
"g_warmup_limit");
2073 if(
cvar(
"g_campaign"))
2076 g_pickup_respawntime_weapon =
cvar(
"g_pickup_respawntime_weapon");
2077 g_pickup_respawntime_superweapon =
cvar(
"g_pickup_respawntime_superweapon");
2078 g_pickup_respawntime_ammo =
cvar(
"g_pickup_respawntime_ammo");
2079 g_pickup_respawntime_short =
cvar(
"g_pickup_respawntime_short");
2080 g_pickup_respawntime_medium =
cvar(
"g_pickup_respawntime_medium");
2081 g_pickup_respawntime_long =
cvar(
"g_pickup_respawntime_long");
2082 g_pickup_respawntime_powerup =
cvar(
"g_pickup_respawntime_powerup");
2083 g_pickup_respawntimejitter_weapon =
cvar(
"g_pickup_respawntimejitter_weapon");
2084 g_pickup_respawntimejitter_superweapon =
cvar(
"g_pickup_respawntimejitter_superweapon");
2085 g_pickup_respawntimejitter_ammo =
cvar(
"g_pickup_respawntimejitter_ammo");
2086 g_pickup_respawntimejitter_short =
cvar(
"g_pickup_respawntimejitter_short");
2087 g_pickup_respawntimejitter_medium =
cvar(
"g_pickup_respawntimejitter_medium");
2088 g_pickup_respawntimejitter_long =
cvar(
"g_pickup_respawntimejitter_long");
2089 g_pickup_respawntimejitter_powerup =
cvar(
"g_pickup_respawntimejitter_powerup");
2091 g_pickup_shells =
cvar(
"g_pickup_shells");
2093 g_pickup_nails =
cvar(
"g_pickup_nails");
2095 g_pickup_rockets =
cvar(
"g_pickup_rockets");
2097 g_pickup_cells =
cvar(
"g_pickup_cells");
2099 g_pickup_plasma =
cvar(
"g_pickup_plasma");
2101 g_pickup_fuel =
cvar(
"g_pickup_fuel");
2102 g_pickup_fuel_jetpack =
cvar(
"g_pickup_fuel_jetpack");
2104 g_pickup_armorsmall =
cvar(
"g_pickup_armorsmall");
2105 g_pickup_armorsmall_max =
cvar(
"g_pickup_armorsmall_max");
2106 g_pickup_armorsmall_anyway =
cvar(
"g_pickup_armorsmall_anyway");
2107 g_pickup_armormedium =
cvar(
"g_pickup_armormedium");
2108 g_pickup_armormedium_max =
cvar(
"g_pickup_armormedium_max");
2109 g_pickup_armormedium_anyway =
cvar(
"g_pickup_armormedium_anyway");
2110 g_pickup_armorbig =
cvar(
"g_pickup_armorbig");
2111 g_pickup_armorbig_max =
cvar(
"g_pickup_armorbig_max");
2112 g_pickup_armorbig_anyway =
cvar(
"g_pickup_armorbig_anyway");
2113 g_pickup_armormega =
cvar(
"g_pickup_armormega");
2114 g_pickup_armormega_max =
cvar(
"g_pickup_armormega_max");
2115 g_pickup_armormega_anyway =
cvar(
"g_pickup_armormega_anyway");
2116 g_pickup_healthsmall =
cvar(
"g_pickup_healthsmall");
2117 g_pickup_healthsmall_max =
cvar(
"g_pickup_healthsmall_max");
2118 g_pickup_healthsmall_anyway =
cvar(
"g_pickup_healthsmall_anyway");
2119 g_pickup_healthmedium =
cvar(
"g_pickup_healthmedium");
2120 g_pickup_healthmedium_max =
cvar(
"g_pickup_healthmedium_max");
2121 g_pickup_healthmedium_anyway =
cvar(
"g_pickup_healthmedium_anyway");
2122 g_pickup_healthbig =
cvar(
"g_pickup_healthbig");
2123 g_pickup_healthbig_max =
cvar(
"g_pickup_healthbig_max");
2124 g_pickup_healthbig_anyway =
cvar(
"g_pickup_healthbig_anyway");
2125 g_pickup_healthmega =
cvar(
"g_pickup_healthmega");
2126 g_pickup_healthmega_max =
cvar(
"g_pickup_healthmega_max");
2127 g_pickup_healthmega_anyway =
cvar(
"g_pickup_healthmega_anyway");
2129 g_pickup_ammo_anyway =
cvar(
"g_pickup_ammo_anyway");
2139 game_starttime =
time +
cvar(
"g_start_delay");
2141 FOREACH(Weapons, it != WEP_Null, { it.wr_init(it); });
2150 if (!e || e.initialize_entity)
2154 e =
new(initialize_entity);
2158 e.initialize_entity = func;
2159 e.initialize_entity_order = order;
2165 if (!cur || cur.initialize_entity_order > order)
2169 prev.initialize_entity_next = e;
2172 e.initialize_entity_next = cur;
2176 cur = cur.initialize_entity_next;
2184 for (
entity e = startoflist; e; e = e.initialize_entity_next)
2186 e.remove_except_protected_forbidden = 1;
2188 for (
entity e = startoflist; e; )
2190 e.remove_except_protected_forbidden = 0;
2191 e.initialize_entity_order = 0;
2193 e.initialize_entity_next =
NULL;
2194 var
void(
entity this) func = e.initialize_entity;
2196 if (e.classname ==
"initialize_entity")
2198 entity wrappee = e.enemy;
2220 WITHSELF(
this, builtin_droptofloor());
2234 if(this.nextthink <= 0 || this.nextthink >
time + dt)
2237 float oldtime =
time;
2239 for (
int iterations = 0; iterations < 128 && !wasfreed(
this); iterations++)
2250 if(this.nextthink <= time || this.nextthink > oldtime + dt || !autocvar_sv_gameplayfix_multiplethinksperframe)
2260 if(autocvar_sv_freezenonclients)
2277 if(it.move_movetype == MOVETYPE_PUSH || it.move_movetype == MOVETYPE_FAKEPUSH)
2280 if (getthink(it) && it.nextthink > 0 && it.nextthink <= time + PHYS_INPUT_TIMELENGTH)
2281 RunThink(it, PHYS_INPUT_TIMELENGTH);
2285 if(autocvar_sv_gameplayfix_delayprojectiles >= 0)
2293 if(IS_CLIENT(it) || it.move_time || it.move_movetype == MOVETYPE_NONE || it.move_movetype == MOVETYPE_PHYSICS)
2295 Movetype_Physics_NoMatchTicrate(it, PHYS_INPUT_TIMELENGTH, false);
2308 if (e.typehitsound) {
2309 STAT(TYPEHIT_TIME, it) =
time;
2310 }
else if (e.killsound) {
2311 STAT(KILL_TIME, it) =
time;
2312 }
else if (e.hitsound_damage_dealt) {
2313 STAT(HIT_TIME, it) =
time;
2315 STAT(HITSOUND_DAMAGE_DEALT_TOTAL, it) +=
ceil(e.hitsound_damage_dealt);
2325 it.typehitsound =
false;
2326 it.hitsound_damage_dealt = 0;
2327 it.killsound =
false;
2336 antilag_record(it, it, altime);
2351 float clients_found;
2356 if(!redirection_timeout)
2359 redirection_timeout =
time + 0.6;
2361 bprint(
"^3SERVER NOTICE:^7 restarting the server\n");
2366 if(
time < redirection_nextthink)
2369 redirection_nextthink =
time + 1;
2374 LOG_INFO(
"Redirecting: sending connect command to ", it.netname);
2382 LOG_INFO(
"Redirecting: ",
ftos(clients_found),
" clients left.");
2384 if(
time > redirection_timeout || clients_found == 0)
2385 localcmd(
"\nwait; wait; wait; quit\n");
2404 TargetMusic_RestoreGame();
2423 PlayerStats_GameReport(
false);
2442 LOG_TRACE(
"Saving persistent data... done!");
2453 LOG_INFO(
"NOTE: crashed before even initializing the world, not saving persistent data");
const int NUM_TEAMS
Number of teams in the game.
void DropToFloor_Handler(entity this)
entity random_start_ammo
Entity that contains amount of ammo to give with random start weapons.
void remove_unsafely(entity e)
float checkrules_suddendeathend
#define IL_EACH(this, cond, body)
int MapInfo_RequiredFlags()
ERASEABLE int db_create()
void race_StartCompleting()
float autocvar_timelimit_overtime
void remove_safely(entity e)
string GetTeamScoreString(float tm, float shortString)
float intermission_exittime
bool world_already_spawned
void GameplayMode_DelayedInit(entity this)
float warmup_start_ammo_shells
float trace_dphitq3surfaceflags
WepSet warmup_start_weapons
string autocvar_sv_termsofservice_url
void GotoNextMap(float reinit)
const float MOVETYPE_PHYSICS
void MapInfo_LoadMapSettings(string s)
string MapInfo_Map_clientstuff
ERASEABLE int db_load(string filename)
void GameRules_limit_fallbacks()
Set any unspecified rules to their defaults.
float g_pickup_weapons_anyway
void RunThink(entity this, float dt)
void Team_SetTeamScore(entity team_ent, float score)
Sets the score of the team.
void SetWinners(.float field, float value)
float TeamScore_AddToTeam(int t, float scorefield, float score)
Adds a score to the given team.
void weaponarena_available_all_update(entity this)
void remove_except_protected(entity e)
WepSet warmup_start_weapons_defaultmask
void PingPLReport_Think(entity this)
float trace_dphitcontents
ClientState CS(Client this)
#define FOREACH_CLIENT(cond, body)
Gametype MapInfo_LoadedGametype
const int SERVERFLAG_ALLOW_FULLBRIGHT
int checkrules_overtimesadded
#define GameRules_scoring_add(client, fld, value)
string MapInfo_Type_ToText(Gametype t)
#define static_init_precache()
float checkrules_suddendeathwarning
const int WINNING_STARTSUDDENDEATHOVERTIME
ERASEABLE void db_close(int db)
void WeaponStats_Shutdown()
float checkpvs(vector viewpos, entity viewee)
var void delete_fn(entity e)
float redirection_nextthink
string m_name
M: wepname : human readable name.
float redirection_timeout
float WinningConditionHelper_lowerisbetter
lower is better, duh
bool autocvar_sv_gameplayfix_multiplethinksperframe
float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, float badsurfaceflags, float attempts, float maxaboveground, float minviewdistance)
void RandomSeed_Think(entity this)
int MapInfo_ForbiddenFlags()
const float TIMEOUT_ACTIVE
string g_weaponarena_list
const int WEP_FLAG_HIDDEN
void Movetype_Physics_NoMatchTicrate(entity this, float movedt, bool isclient)
const float LATENCY_THINKRATE
void anticheat_endframe()
WepSet warmup_start_weapons_default
void InitializeEntitiesRun()
float warmup_start_ammo_plasma
bool autocvar_g_warmup_allguns
#define IS_REAL_CLIENT(v)
string trace_dphittexturename
entity WinningConditionHelper_winner
the winning player, or NULL if none
float autocvar_g_antilag_nudge
string redirection_target
ERASEABLE void IL_ENDFRAME()
void Map_MarkAsRecent(string m)
float autocvar_sv_mapchange_delay
float WinningConditionHelper_zeroisworst
zero is worst, duh
void ScoreRules_generic()
Gametype MapInfo_CurrentGametype()
bool autocvar_sv_eventlog_console
float cvar_purechanges_count
#define autocvar_g_maplist
float warmup_start_ammo_cells
bool autocvar_g_waypoints_for_items
float autocvar_quit_and_redirect_timer
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
int MapInfo_CurrentFeatures()
bool autocvar_sv_curl_serverpackages_auto
void readplayerstartcvars()
entity scores_initialized
void GameRules_teams(bool value)
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float warmup_start_ammo_fuel
bool bot_waypoints_for_items
float WinningConditionHelper_secondscore
second highest score
void droptofloor(entity this)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
const int MOVETYPE_QCENTITY
#define BADPRESUFFIX(p, s)
float g_pickup_rockets_max
int autocvar_leadlimit_and_fraglimit
float GetWinningCode(float fraglimitreached, float equality)
ERASEABLE void db_save(int db, string filename)
ERASEABLE void db_dump(int db, string filename)
spawnfunc(__init_dedicated_server)
#define startsWith(haystack, needle)
bool autocvar_sv_freezenonclients
float DoNextMapOverride(float reinit)
#define autocvar_g_weaponarena
float TeamScore_GetCompareValue(float t)
Returns a value indicating the team score (and higher is better).
bool autocvar_g_use_ammunition
float WinningCondition_RanOutOfSpawns()
string getrecords(int page)
bool some_spawn_has_been_used
string autocvar_sessionid
void GameLogEcho(string s)
float g_pickup_shells_max
#define WITHSELF(value, block)
const float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS
void DumpStats(float final)
#define Team_ColorName_Upper(teamid)
bool RandomSeed_Send(entity this, entity to, int sf)
void weaponarena_available_devall_update(entity this)
entity Team_GetTeamFromIndex(int index)
Returns the global team entity at the given index.
void MapInfo_ClearTemps()
#define BITSET(var, mask, flag)
float warmup_start_armorvalue
void __init_dedicated_server_shutdown()
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void antilag_record(entity e, entity store, float t)
bool autocvar_sv_logscores_file
void ReadyRestart(bool forceWarmupEnd)
IntrusiveList g_projectiles
string Team_ColorCode(int teamid)
ERASEABLE bool cvar_value_issafe(string s)
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void InitializeEntity(entity e, void(entity this) func, int order)
bool TeamBalance_IsTeamAllowed(entity balance, int index)
Returns whether the team change to the specified team is allowed.
const int WEP_FLAG_SPECIALATTACK
STATIC_INIT_EARLY(maxclients)
float g_pickup_plasma_max
void GotoFirstMap(entity this)
float warmup_start_ammo_rockets
float want_weapon(entity weaponinfo, float allguns)
WepSet start_weapons_default
bool sv_ready_restart_after_countdown
void AddWinners(.float field, float value)
float WinningConditionHelper_winnerteam
the color of the winning team, or -1 if none
void FixIntermissionClient(entity e)
entity initialize_entity_first
#define INGAME_JOINED(it)
#define tokenizebyseparator
void CampaignPreIntermission()
bool autocvar_sv_db_saveasdump
#define MUTATOR_CALLHOOK(id,...)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
float WinningCondition_Scores(float limit, float leadlimit)
string sv_termsofservice_url_escaped
float warmup_start_health
float autocvar_g_maplist_shuffle
#define new_pure(class)
purely logical entities (.origin doesn't work)
noref int autocvar_developer
bool autocvar_g_spawn_useallspawns
float checkrules_equality
bool intermission_running
IntrusiveList g_moveables
int Team_IndexToTeam(int index)
Converts team index into team value.
bool autocvar_sv_logscores_console
int autocvar_g_pickup_items
const int WEP_FLAG_NORMAL
ERASEABLE string cons(string a, string b)
float default_player_alpha
WepSet weapons_start()
Weapons the player normally starts with outside weapon arena.
const int WEP_FLAG_MUTATORBLOCKED
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings...
int random_start_weapons_count
Number of random start weapons to give to players.
bool autocvar_sv_logscores_bots
int autocvar_timelimit_overtimes
bool autocvar_sv_eventlog
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
float WinningConditionHelper_topscore
highest score
float MapInfo_FilterGametype(Gametype pGametype, int pFeatures, int pFlagsRequired, int pFlagsForbidden, bool pAbortOnGenerate)
string GetPlayerScoreString(entity pl, float shortString)
Returns score strings for eventlog etc.
ERASEABLE bool fexists(string f)
float WinningConditionHelper_equality
we have no winner
float default_weapon_alpha
Weapon Weapon_from_name(string s)
int autocvar_sv_eventlog_files_counter
float MOVETYPE_USER_FIRST
ERASEABLE string strftime_s()
WepSet start_weapons_defaultmask
float Team_GetTeamScore(entity team_ent)
Returns the score of the team.
#define FOREACH(list, cond, body)
float autocvar_timelimit_suddendeath
string autocvar_sv_logscores_filename
WepSet g_weaponarena_weapons
bool MoveToRandomLocationWithinBounds(entity e, vector boundmin, vector boundmax, float goodcontents, float badcontents, float badsurfaceflags, int attempts, float maxaboveground, float minviewdistance)
bool Team_IsValidTeam(int team_num)
Returns whether team value is valid.
void PingPLReport_Spawn()
#define static_init_late()
float InitiateSuddenDeath()
IntrusiveList g_spawnpoints
void WinningConditionHelper(entity this)
Sets the following results for the current scores entities.
string cache_lastmutatormsg
float autocvar_g_player_alpha
float warmup_start_ammo_nails
void weaponarena_available_most_update(entity this)
#define endsWith(this, suffix)