float ca_teams;
float allowed_to_spawn;
+#define ST_CA_ROUNDS 1
+void ca_ScoreRules(float teams)
+{
+ ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, TRUE);
+ ScoreInfo_SetLabel_TeamScore(ST_CA_ROUNDS, "rounds", SFL_SORT_PRIO_PRIMARY);
+ ScoreRules_basics_end();
+}
+
void CA_count_alive_players()
{
entity e;
ca_teams = autocvar_g_ca_teams;
ca_teams = bound(2, ca_teams, 4);
ret_float = ca_teams;
- ScoreRules_ca(ca_teams);
+ ca_ScoreRules(ca_teams);
round_handler_Spawn(CA_CheckTeams, CA_CheckWinner, CA_RoundStart);
round_handler_Init(5, autocvar_g_ca_warmup, autocvar_g_ca_round_timelimit);
#define ICE_MIN_ALPHA 0.1
float freezetag_teams;
+#define SP_FREEZETAG_REVIVALS 4
+void freezetag_ScoreRules(float teams)
+{
+ ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
+ ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS, "revivals", 0);
+ ScoreRules_basics_end();
+}
+
void freezetag_count_alive_players()
{
entity e;
if(freezetag_teams < 2)
freezetag_teams = autocvar_g_freezetag_teams;
freezetag_teams = bound(2, freezetag_teams, 4);
- ScoreRules_freezetag(freezetag_teams);
+ freezetag_ScoreRules(freezetag_teams);
round_handler_Spawn(freezetag_CheckTeams, freezetag_CheckWinner, func_null);
round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
float kh_key_dropped, kh_key_carried;
+#define ST_KH_CAPS 1
+#define SP_KH_CAPS 4
+#define SP_KH_PUSHES 5
+#define SP_KH_DESTROYS 6
+#define SP_KH_PICKUPS 7
+#define SP_KH_KCKILLS 8
+#define SP_KH_LOSSES 9
+void kh_ScoreRules(float teams)
+{
+ ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE);
+ ScoreInfo_SetLabel_TeamScore( ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_DESTROYS, "destroyed", SFL_LOWER_IS_BETTER);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_PICKUPS, "pickups", 0);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_KCKILLS, "kckills", 0);
+ ScoreInfo_SetLabel_PlayerScore(SP_KH_LOSSES, "losses", SFL_LOWER_IS_BETTER);
+ ScoreRules_basics_end();
+}
+
float kh_KeyCarrier_waypointsprite_visible_for_player(entity e) // runs all the time
{
if(!IS_PLAYER(e) || self.team != e.team)
addstat(STAT_KH_KEYS, AS_INT, kh_state);
- ScoreRules_kh(kh_teams);
+ kh_ScoreRules(kh_teams);
}
void kh_finalize()
return e.team;
}
+#define ST_NEXBALL_GOALS 1
+#define SP_NEXBALL_GOALS 4
+#define SP_NEXBALL_FAULTS 5
+void nb_ScoreRules(float teams)
+{
+ ScoreRules_basics(teams, 0, 0, TRUE);
+ ScoreInfo_SetLabel_TeamScore( ST_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
+ ScoreInfo_SetLabel_PlayerScore( SP_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
+ ScoreInfo_SetLabel_PlayerScore(SP_NEXBALL_FAULTS, "faults", SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER);
+ ScoreRules_basics_end();
+}
void LogNB(string mode, entity actor)
{
}
}
-// scoreboard setup
-void nb_ScoreRules(float teams)
-{
- ScoreRules_basics(teams, 0, 0, TRUE);
- ScoreInfo_SetLabel_TeamScore( ST_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
- ScoreInfo_SetLabel_PlayerScore( SP_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
- ScoreInfo_SetLabel_PlayerScore(SP_NEXBALL_FAULTS, "faults", SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER);
- ScoreRules_basics_end();
-}
-
void nb_delayedinit(void)
{
if(find(world, classname, "nexball_team") == world)
ScoreRules_basics_end();
}
-// Key hunt stuff
-#define ST_KH_CAPS 1
-#define SP_KH_CAPS 4
-#define SP_KH_PUSHES 5
-#define SP_KH_DESTROYS 6
-#define SP_KH_PICKUPS 7
-#define SP_KH_KCKILLS 8
-#define SP_KH_LOSSES 9
-void ScoreRules_kh(float teams)
-{
- ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE);
- ScoreInfo_SetLabel_TeamScore (ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_DESTROYS, "destroyed", SFL_LOWER_IS_BETTER);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_PICKUPS, "pickups", 0);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_KCKILLS, "kckills", 0);
- ScoreInfo_SetLabel_PlayerScore(SP_KH_LOSSES, "losses", SFL_LOWER_IS_BETTER);
- ScoreRules_basics_end();
-}
-
-// Nexball stuff
-#define ST_NEXBALL_GOALS 1
-#define SP_NEXBALL_GOALS 4
-#define SP_NEXBALL_FAULTS 5
-void ScoreRules_nexball(float teams)
-{
- ScoreRules_basics(teams, 0, 0, TRUE);
- ScoreInfo_SetLabel_TeamScore( ST_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
- ScoreInfo_SetLabel_PlayerScore( SP_NEXBALL_GOALS, "goals", SFL_SORT_PRIO_PRIMARY);
- ScoreInfo_SetLabel_PlayerScore(SP_NEXBALL_FAULTS, "faults", SFL_SORT_PRIO_SECONDARY | SFL_LOWER_IS_BETTER);
- ScoreRules_basics_end();
-}
-
-#define SP_FREEZETAG_REVIVALS 4
-void ScoreRules_freezetag(float teams)
-{
- ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
- ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS, "revivals", 0);
- ScoreRules_basics_end();
-}
-
-#define ST_CA_ROUNDS 1
-void ScoreRules_ca(float teams)
-{
- ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, TRUE);
- ScoreInfo_SetLabel_TeamScore(ST_CA_ROUNDS, "rounds", SFL_SORT_PRIO_PRIMARY);
- ScoreRules_basics_end();
-}