From f7b1e7557d5fed512d43a3d2062e0fa1798ab03a Mon Sep 17 00:00:00 2001
From: terencehill <piuntn@gmail.com>
Date: Fri, 4 Jan 2013 19:59:01 +0100
Subject: [PATCH] Cleanup: move stuff from .qh into .qc files

---
 qcsrc/server/mutators/gamemode_arena.qc |  9 +++++++++
 qcsrc/server/mutators/gamemode_arena.qh | 14 +-------------
 qcsrc/server/mutators/gamemode_ca.qc    |  8 ++++++++
 qcsrc/server/mutators/gamemode_ca.qh    |  9 +--------
 4 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/qcsrc/server/mutators/gamemode_arena.qc b/qcsrc/server/mutators/gamemode_arena.qc
index 132b116bb7..cc93dd3e41 100644
--- a/qcsrc/server/mutators/gamemode_arena.qc
+++ b/qcsrc/server/mutators/gamemode_arena.qc
@@ -1,3 +1,12 @@
+.float spawned;
+float maxspawned;
+float numspawned;
+.entity spawnqueue_next;
+.entity spawnqueue_prev;
+.float spawnqueue_in;
+entity spawnqueue_first;
+entity spawnqueue_last;
+
 void Spawnqueue_Insert(entity e)
 {
 	if(e.spawnqueue_in)
diff --git a/qcsrc/server/mutators/gamemode_arena.qh b/qcsrc/server/mutators/gamemode_arena.qh
index 7e23d4f1c3..a2f623a000 100644
--- a/qcsrc/server/mutators/gamemode_arena.qh
+++ b/qcsrc/server/mutators/gamemode_arena.qh
@@ -1,14 +1,2 @@
-float maxspawned;
-float numspawned;
+// should be removed in the future, as other code should not have to care
 float arena_roundbased;
-.float spawned;
-.entity spawnqueue_next;
-.entity spawnqueue_prev;
-.float spawnqueue_in;
-entity spawnqueue_first;
-entity spawnqueue_last;
-
-void Spawnqueue_Insert(entity e);
-void Spawnqueue_Remove(entity e);
-void Spawnqueue_Unmark(entity e);
-void Spawnqueue_Mark(entity e);
diff --git a/qcsrc/server/mutators/gamemode_ca.qc b/qcsrc/server/mutators/gamemode_ca.qc
index 528a8812a5..1a27b119e2 100644
--- a/qcsrc/server/mutators/gamemode_ca.qc
+++ b/qcsrc/server/mutators/gamemode_ca.qc
@@ -1,3 +1,9 @@
+float total_players;
+float redalive, bluealive, yellowalive, pinkalive;
+.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
+float ca_teams;
+float allowed_to_spawn;
+
 void CA_count_alive_players()
 {
 	entity e;
@@ -57,6 +63,8 @@ float CA_GetWinnerTeam()
 	return -1; // no player left
 }
 
+#define CA_ALIVE_TEAMS() ((redalive > 0) + (bluealive > 0) + (yellowalive > 0) + (pinkalive > 0))
+#define CA_ALIVE_TEAMS_OK() (CA_ALIVE_TEAMS() == ca_teams)
 float CA_CheckWinner()
 {
 	entity e;
diff --git a/qcsrc/server/mutators/gamemode_ca.qh b/qcsrc/server/mutators/gamemode_ca.qh
index 8d493bb312..54df1a4013 100644
--- a/qcsrc/server/mutators/gamemode_ca.qh
+++ b/qcsrc/server/mutators/gamemode_ca.qh
@@ -1,10 +1,3 @@
+// should be removed in the future, as other code should not have to care
 .float caplayer;
-float total_players;
-float redalive, bluealive, yellowalive, pinkalive;
-.float redalive_stat, bluealive_stat, yellowalive_stat, pinkalive_stat;
-#define CA_ALIVE_TEAMS() ((redalive > 0) + (bluealive > 0) + (yellowalive > 0) + (pinkalive > 0))
-#define CA_ALIVE_TEAMS_OK() (CA_ALIVE_TEAMS() == ca_teams)
-float ca_teams;
-
-float allowed_to_spawn;
 
-- 
2.39.5