head = nextent(head);
}
+ 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);
CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
PlayerStats_Shutdown();
WeaponStats_Shutdown();
+ Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
+
if(autocvar_sv_eventlog)
GameLogEcho(":gameover");
tl += autocvar_timelimit_overtime;
cvar_set("timelimit", ftos(tl));
- Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime);
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime);
}
float GetWinningCode(float fraglimitreached, float equality)
{
if (head.health > 0)
{
- if (head.team == FL_TEAM_1) t1 = 1;
- if (head.team == FL_TEAM_2) t2 = 1;
- if (head.team == FL_TEAM_3) t3 = 1;
- if (head.team == FL_TEAM_4) t4 = 1;
+ if (head.team == NUM_TEAM_1) t1 = 1;
+ if (head.team == NUM_TEAM_2) t2 = 1;
+ if (head.team == NUM_TEAM_3) t3 = 1;
+ if (head.team == NUM_TEAM_4) t4 = 1;
}
head = find(head, classname, "onslaught_generator");
}
{
// game over, only one team remains (or none)
ClearWinners();
- if (t1) SetWinners(team, FL_TEAM_1);
- if (t2) SetWinners(team, FL_TEAM_2);
- if (t3) SetWinners(team, FL_TEAM_3);
- if (t4) SetWinners(team, FL_TEAM_4);
+ if (t1) SetWinners(team, NUM_TEAM_1);
+ if (t2) SetWinners(team, NUM_TEAM_2);
+ if (t3) SetWinners(team, NUM_TEAM_3);
+ if (t4) SetWinners(team, NUM_TEAM_4);
dprint("Have a winner, ending game.\n");
return WINNING_YES;
}
status = WINNING_NO;
// as the timelimit has not yet passed just assume the defending team will win
- if(assault_attacker_team == FL_TEAM_1)
+ if(assault_attacker_team == NUM_TEAM_1)
{
- SetWinners(team, FL_TEAM_2);
+ SetWinners(team, NUM_TEAM_2);
}
else
{
- SetWinners(team, FL_TEAM_1);
+ SetWinners(team, NUM_TEAM_1);
}
entity ent;
if(teamplay)
{
- team1_score = TeamScore_GetCompareValue(FL_TEAM_1);
- team2_score = TeamScore_GetCompareValue(FL_TEAM_2);
- team3_score = TeamScore_GetCompareValue(FL_TEAM_3);
- team4_score = TeamScore_GetCompareValue(FL_TEAM_4);
+ team1_score = TeamScore_GetCompareValue(NUM_TEAM_1);
+ team2_score = TeamScore_GetCompareValue(NUM_TEAM_2);
+ team3_score = TeamScore_GetCompareValue(NUM_TEAM_3);
+ team4_score = TeamScore_GetCompareValue(NUM_TEAM_4);
}
ClearWinners();
FOR_EACH_PLAYER(head) if(head.deadflag == DEAD_NO)
{
- if(head.team == FL_TEAM_1)
+ if(head.team == NUM_TEAM_1)
team1_score = 1;
- else if(head.team == FL_TEAM_2)
+ else if(head.team == NUM_TEAM_2)
team2_score = 1;
- else if(head.team == FL_TEAM_3)
+ else if(head.team == NUM_TEAM_3)
team3_score = 1;
- else if(head.team == FL_TEAM_4)
+ else if(head.team == NUM_TEAM_4)
team4_score = 1;
}
for(head = world; (head = find(head, classname, "info_player_deathmatch")) != world; )
{
- if(head.team == FL_TEAM_1)
+ if(head.team == NUM_TEAM_1)
team1_score = 1;
- else if(head.team == FL_TEAM_2)
+ else if(head.team == NUM_TEAM_2)
team2_score = 1;
- else if(head.team == FL_TEAM_3)
+ else if(head.team == NUM_TEAM_3)
team3_score = 1;
- else if(head.team == FL_TEAM_4)
+ else if(head.team == NUM_TEAM_4)
team4_score = 1;
}
{
float t, i;
if(team1_score)
- t = FL_TEAM_1;
+ t = NUM_TEAM_1;
else if(team2_score)
- t = FL_TEAM_2;
+ t = NUM_TEAM_2;
else if(team3_score)
- t = FL_TEAM_3;
+ t = NUM_TEAM_3;
else // if(team4_score)
- t = FL_TEAM_4;
+ t = NUM_TEAM_4;
CheckAllowedTeams(world);
for(i = 0; i < MAX_TEAMSCORE; ++i)
{
- if(t != FL_TEAM_1) if(c1 >= 0) TeamScore_AddToTeam(FL_TEAM_1, i, -1000);
- if(t != FL_TEAM_2) if(c2 >= 0) TeamScore_AddToTeam(FL_TEAM_2, i, -1000);
- if(t != FL_TEAM_3) if(c3 >= 0) TeamScore_AddToTeam(FL_TEAM_3, i, -1000);
- if(t != FL_TEAM_4) if(c4 >= 0) TeamScore_AddToTeam(FL_TEAM_4, i, -1000);
+ if(t != NUM_TEAM_1) if(c1 >= 0) TeamScore_AddToTeam(NUM_TEAM_1, i, -1000);
+ if(t != NUM_TEAM_2) if(c2 >= 0) TeamScore_AddToTeam(NUM_TEAM_2, i, -1000);
+ if(t != NUM_TEAM_3) if(c3 >= 0) TeamScore_AddToTeam(NUM_TEAM_3, i, -1000);
+ if(t != NUM_TEAM_4) if(c4 >= 0) TeamScore_AddToTeam(NUM_TEAM_4, i, -1000);
}
AddWinners(team, t);
{
checkrules_suddendeathwarning = TRUE;
if(g_race && !g_race_qualifying)
- Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_RACE_FINISHLAP);
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_RACE_FINISHLAP);
else
- Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_OVERTIME_FRAG);
+ Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_OVERTIME_FRAG);
}
}
else