pingplreport.nextthink = time;
}
-float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1;
+const float SPAWNFLAG_NO_WAYPOINTS_FOR_ITEMS = 1;
string redirection_target;
float world_initialized;
// mapinfo
BADCVAR("fraglimit");
- BADCVAR("g_arena");
BADCVAR("g_assault");
BADCVAR("g_ca");
BADCVAR("g_ca_teams");
// does nothing visible
BADCVAR("captureleadlimit_override");
- BADCVAR("g_arena_point_leadlimit");
BADCVAR("g_balance_kill_delay");
BADCVAR("g_ca_point_leadlimit");
BADCVAR("g_ctf_captimerecord_always");
BADCVAR("sv_fraginfo");
BADCVAR("sv_timeout");
BADPREFIX("sv_timeout_");
- BADCVAR("welcome_message_time");
BADPREFIX("crypto_");
BADPREFIX("g_chat_");
BADPREFIX("g_ctf_captimerecord_");
BADCVAR("sv_vote_master_commands");
BADCVAR("sv_vote_master_password");
BADCVAR("sv_vote_simple_majority_factor");
- BADCVAR("sys_ticrate");
BADCVAR("teamplay_mode");
BADCVAR("timelimit_override");
BADCVAR("g_spawnshieldtime");
BADCVAR("g_nix");
BADCVAR("g_grappling_hook");
BADCVAR("g_jetpack");
-
+
#undef BADPREFIX
#undef BADCVAR
InitGameplayMode();
readlevelcvars();
GrappleHookInit();
+ ArcInit();
ElectroInit();
- LaserInit();
player_count = 0;
bot_waypoints_for_items = autocvar_g_waypoints_for_items;
WeaponStats_Init();
- WEPSET_ADDSTAT();
+ WepSet_AddStat();
addstat(STAT_SWITCHWEAPON, AS_INT, switchweapon);
addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon);
addstat(STAT_GAMESTARTTIME, AS_FLOAT, stat_game_starttime);
{
float pass, i;
+ dprint("Trying MaplistMethod_Iterate\n");
+
for(pass = 1; pass <= 2; ++pass)
{
for(i = 1; i < Map_Count; ++i)
float() MaplistMethod_Repeat = // fallback method
{
+ dprint("Trying MaplistMethod_Repeat\n");
+
if(Map_Check(Map_Current, 2))
return Map_Current;
return -2;
{
float i, imax;
+ dprint("Trying MaplistMethod_Random\n");
+
imax = 42;
for(i = 0; i <= imax; ++i)
{
float i, j, imax, insertpos;
+ dprint("Trying MaplistMethod_Shuffle\n");
+
imax = 42;
for(i = 0; i <= imax; ++i)
void Maplist_Init()
{
Map_Count = tokenizebyseparator(autocvar_g_maplist, " ");
- if(Map_Count == 0)
+ float i;
+ for (i = 0; i < Map_Count; ++i)
+ if (Map_Check(i, 2))
+ break;
+ if (i == Map_Count)
{
- bprint( "Maplist is empty! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
+ bprint( "Maplist contains no usable maps! Resetting it to default map list.\n" );
+ cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags() | MAPINFO_FLAG_NOAUTOMAPLIST));
if(autocvar_g_maplist_shuffle)
ShuffleMaplist();
localcmd("\nmenu_cmd sync\n");
return;
alreadychangedlevel = TRUE;
- {
- string nextMap;
- float allowReset;
+ string nextMap;
- for(allowReset = 1; allowReset >= 0; --allowReset)
- {
- nextMap = GetNextMap();
- if(nextMap != "")
- break;
-
- if(allowReset)
- {
- bprint( "Maplist contains no single playable map! Resetting it to default map list.\n" );
- cvar_set("g_maplist", MapInfo_ListAllAllowedMaps(MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags()));
- if(autocvar_g_maplist_shuffle)
- ShuffleMaplist();
- localcmd("\nmenu_cmd sync\n");
- }
- else
- {
- error("Everything is broken - not even the default map list works. Please report this to the developers.");
- }
- }
- Map_Goto(reinit);
- }
+ nextMap = GetNextMap();
+ if(nextMap == "")
+ error("Everything is broken - cannot find a next map. Please report this to the developers.");
+ Map_Goto(reinit);
}
{
s = strcat(":player:see-labels:", GetPlayerScoreString(other, 0), ":");
s = strcat(s, ftos(rint(time - other.jointime)), ":");
- if(IS_PLAYER(other) || g_arena || other.caplayer == 1 || g_lms)
+ if(IS_PLAYER(other) || other.caplayer == 1 || g_lms)
s = strcat(s, ftos(other.team), ":");
else
s = strcat(s, "spectator:");
PlayerStats_AddGlobalInfo(e);
PlayerStats_Shutdown();
WeaponStats_Shutdown();
-
+
Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
if(autocvar_sv_eventlog)
float checkrules_suddendeathend;
float checkrules_overtimesadded; //how many overtimes have been already added
-float WINNING_NO = 0; // no winner, but time limits may terminate the game
-float WINNING_YES = 1; // winner found
-float WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
-float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
+const float WINNING_NO = 0; // no winner, but time limits may terminate the game
+const float WINNING_YES = 1; // winner found
+const float WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
+const float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
float InitiateSuddenDeath()
{
WinningConditionHelper(); // set worldstatus
- if(inWarmupStage)
+ if(warmup_stage)
return WINNING_NO;
// first check if the game has ended
if(WinningConditionHelper_zeroisworst)
leadlimit = 0; // not supported in this mode
- if(g_dm || g_tdm || g_arena || g_ca || (g_race && !g_race_qualifying) || g_nexball)
+ if(g_dm || g_tdm || g_ca || (g_race && !g_race_qualifying) || g_nexball)
// these modes always score in increments of 1, thus this makes sense
{
if(leaderfrags != WinningConditionHelper_topscore)
fraglimit = autocvar_fraglimit;
leadlimit = autocvar_leadlimit;
- if(inWarmupStage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
+ if(warmup_stage || time <= game_starttime) // NOTE: this is <= to prevent problems in the very tic where the game starts
{
if(timelimit > 0)
timelimit = 0; // timelimit is not made for warmup
if(mapvote_initialized)
return "Can't suggest - voting is already in progress!";
m = MapInfo_FixName(m);
- if not(m)
+ if (!m)
return "The map you suggested is not available on this server.";
if(!autocvar_g_maplist_votable_suggestions_override_mostrecent)
if(Map_IsRecent(m))
float i;
if(sf & 1)
- sf &~= 2; // if we send 1, we don't need to also send 2
+ sf &= ~2; // if we send 1, we don't need to also send 2
WriteByte(MSG_ENTITY, ENT_CLIENT_MAPVOTE);
WriteByte(MSG_ENTITY, sf);