buf_cvarlist(h, "", "_"); // exclude all _ cvars as they are temporary
n = buf_getsize(h);
- adding = TRUE;
- pureadding = TRUE;
+ adding = true;
+ pureadding = true;
for(i = 0; i < n; ++i)
{
{
WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
WriteShort(MSG_ENTITY, self.cnt);
- return TRUE;
+ return true;
}
void RandomSeed_Think()
{
{
randomseed = spawn();
randomseed.think = RandomSeed_Think;
- Net_LinkEntity(randomseed, FALSE, 0, RandomSeed_Send);
+ Net_LinkEntity(randomseed, false, 0, RandomSeed_Send);
entity oldself;
oldself = self;
if(world_already_spawned)
error("world already spawned - you may have EXACTLY ONE worldspawn!");
- world_already_spawned = TRUE;
+ world_already_spawned = true;
remove = remove_safely; // during spawning, watch what you remove!
head = nextent(head);
}
- server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? TRUE : FALSE);
+ server_is_dedicated = (stof(cvar_defstring("is_dedicated")) ? true : false);
// needs to be done so early because of the constants they create
CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
// character set: ASCII 33-126 without the following characters: : ; ' " \ $
if(autocvar_sv_eventlog)
{
- s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(FALSE, "%s"), floor(random() * 1000000));
+ s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
matchid = strzone(s);
GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
if(substring(argv(i), -18, -1) != "-serverpackage.txt")
if(substring(argv(i), -14, -1) != ".serverpackage") // OLD legacy
s = strcat(s, " ", argv(i));
- fd = search_begin("*-serverpackage.txt", TRUE, FALSE);
+ fd = search_begin("*-serverpackage.txt", true, false);
if(fd >= 0)
{
j = search_getsize(fd);
s = strcat(s, " ", search_getfilename(fd, i));
search_end(fd);
}
- fd = search_begin("*.serverpackage", TRUE, FALSE);
+ fd = search_begin("*.serverpackage", true, false);
if(fd >= 0)
{
j = search_getsize(fd);
if(!fexists(strcat("maps/", map, ".waypoints")))
{
dprint(": no waypoints\n");
- return FALSE;
+ return false;
}
dprint(": has waypoints\n");
}
if(player_count < mapmin)
{
dprint("not enough\n");
- return FALSE;
+ return false;
}
if(player_count > mapmax)
{
dprint("too many\n");
- return FALSE;
+ return false;
}
dprint("right size\n");
- return TRUE;
+ return true;
}
dprint(": not found\n");
- return TRUE;
+ return true;
}
string Map_Filename(float position)
if(autocvar_g_campaign)
{
CampaignPostIntermission();
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
if(autocvar_quit_when_empty)
{
if(player_count <= currentbots)
{
localcmd("quit\n");
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
}
if(autocvar_quit_and_redirect != "")
{
redirection_target = strzone(autocvar_quit_and_redirect);
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
if (!reinit && autocvar_samelevel) // if samelevel is set, stay on same level
{
localcmd("restart\n");
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
if(autocvar_nextmap != "")
{
cvar_set("nextmap",m);
if(!m || gametypevote)
- return FALSE;
+ return false;
if(autocvar_sv_vote_gametype)
{
Map_Goto_SetStr(m);
- return FALSE;
+ return false;
}
if(MapInfo_CheckMap(m))
{
Map_Goto_SetStr(m);
Map_Goto(reinit);
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
}
if(!reinit && autocvar_lastlevel)
{
cvar_settemp_restore();
localcmd("set lastlevel 0\ntogglemenu 1\n");
- alreadychangedlevel = TRUE;
- return TRUE;
+ alreadychangedlevel = true;
+ return true;
}
- return FALSE;
+ return false;
}
void GotoNextMap(float reinit)
//string s;
if (alreadychangedlevel)
return;
- alreadychangedlevel = TRUE;
+ alreadychangedlevel = true;
string nextMap;
&& ((self.autoscreenshot > 0) && (time > self.autoscreenshot)) )
{
self.autoscreenshot = -1;
- if(IS_REAL_CLIENT(self)) { stuffcmd(self, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(FALSE, "%s"))); }
+ if(IS_REAL_CLIENT(self)) { stuffcmd(self, sprintf("\nscreenshot screenshots/autoscreenshot/%s-%s.jpg; echo \"^5A screenshot has been taken at request of the server.\"\n", GetMapname(), strftime(false, "%s"))); }
return;
}
if(!final)
{
- to_console = TRUE; // always print printstats replies
- to_eventlog = FALSE; // but never print them to the event log
+ to_console = true; // always print printstats replies
+ to_eventlog = false; // but never print them to the event log
}
if(to_eventlog)
if(autocvar_sv_eventlog_console)
- to_console = FALSE; // otherwise we get the output twice
+ to_console = false; // otherwise we get the output twice
if(final)
s = ":scores:";
{
file = fopen(autocvar_sv_logscores_filename, FILE_APPEND);
if(file == -1)
- to_file = FALSE;
+ to_file = false;
else
fputs(file, strcat(s, "\n"));
}
*/
void NextLevel()
{
- gameover = TRUE;
+ gameover = true;
intermission_running = 1;
VoteReset();
- DumpStats(TRUE);
+ DumpStats(true);
// send statistics
- PlayerStats_GameReport(TRUE);
+ PlayerStats_GameReport(true);
WeaponStats_Shutdown();
Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
float have_players;
float l;
- have_player = FALSE;
- have_players = FALSE;
+ have_player = false;
+ have_players = false;
l = LMS_NewPlayerLives();
head = find(world, classname, "player");
if(head)
- have_player = TRUE;
+ have_player = true;
head2 = find(head, classname, "player");
if(head2)
- have_players = TRUE;
+ have_players = true;
if(have_player)
{
ClearWinners();
if(WinningConditionHelper_winner)
- WinningConditionHelper_winner.winning = TRUE;
+ WinningConditionHelper_winner.winning = true;
if(WinningConditionHelper_topscore == WinningConditionHelper_secondscore)
return WINNING_NEVER;
}
}
- limitreached = FALSE;
+ limitreached = false;
if(limit)
if(WinningConditionHelper_topscore >= limit)
- limitreached = TRUE;
+ limitreached = true;
if(leadlimit)
{
float leadlimitreached;
ClearWinners();
if(team1_score + team2_score + team3_score + team4_score == 0)
{
- checkrules_equality = TRUE;
+ checkrules_equality = true;
return WINNING_YES;
}
else if(team1_score + team2_score + team3_score + team4_score == 1)
{
if(!checkrules_suddendeathwarning)
{
- checkrules_suddendeathwarning = TRUE;
+ checkrules_suddendeathwarning = true;
if(g_race && !g_race_qualifying)
Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_RACE_FINISHLAP);
else
// needed!
FOR_EACH_CLIENT(self)
{
- self.typehitsound = FALSE;
+ self.typehitsound = false;
self.damage_dealt = 0;
antilag_record(self, altime);
}
/*
* RedirectionThink:
- * returns TRUE if redirecting
+ * returns true if redirecting
*/
float redirection_timeout;
float redirection_nextthink;
float clients_found;
if(redirection_target == "")
- return FALSE;
+ return false;
if(!redirection_timeout)
{
}
if(time < redirection_nextthink)
- return TRUE;
+ return true;
redirection_nextthink = time + 1;
if(time > redirection_timeout || clients_found == 0)
localcmd("\nwait; wait; wait; quit\n");
- return TRUE;
+ return true;
}
void TargetMusic_RestoreGame();
Ban_SaveBans();
// playerstats with unfinished match
- PlayerStats_GameReport(FALSE);
+ PlayerStats_GameReport(false);
if(!cheatcount_total)
{