about summary refs log tree commit diff
path: root/src/game/server/gamecontroller.cpp
diff options
context:
space:
mode:
authorTeetime <TeetimeTW@yahoo.de>2013-01-12 07:59:20 +0100
committerTeetime <TeetimeTW@yahoo.de>2013-01-12 07:59:20 +0100
commit90770bc12e3266cf428b66abbbd4d6bb85a5bc55 (patch)
tree6a51446a4a1ea4ca73ce61bd97bb4bad5a48c431 /src/game/server/gamecontroller.cpp
parent198122516365d17a489cc86f205d44cc0008f99d (diff)
downloadzcatch-90770bc12e3266cf428b66abbbd4d6bb85a5bc55.tar.gz
zcatch-90770bc12e3266cf428b66abbbd4d6bb85a5bc55.zip
Refactored some things, corrected indentation etc..
Diffstat (limited to 'src/game/server/gamecontroller.cpp')
-rw-r--r--src/game/server/gamecontroller.cpp58
1 files changed, 24 insertions, 34 deletions
diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp
index 58c4d9f0..7001ca32 100644
--- a/src/game/server/gamecontroller.cpp
+++ b/src/game/server/gamecontroller.cpp
@@ -136,35 +136,30 @@ bool IGameController::OnEntity(int Index, vec2 Pos)
 		m_aaSpawnPoints[1][m_aNumSpawnPoints[1]++] = Pos;
 	else if(Index == ENTITY_SPAWN_BLUE)
 		m_aaSpawnPoints[2][m_aNumSpawnPoints[2]++] = Pos;
-	/* zCatch */
-   	else if(!GameServer()->m_pController->IsZCatch())
-    	{
-        if(Index == ENTITY_ARMOR_1)
-            Type = POWERUP_ARMOR;
-        else if(Index == ENTITY_HEALTH_1)
-            Type = POWERUP_HEALTH;
-        else if(Index == ENTITY_WEAPON_SHOTGUN)
-        {
-            Type = POWERUP_WEAPON;
-            SubType = WEAPON_SHOTGUN;
-        }
-        else if(Index == ENTITY_WEAPON_GRENADE)
-        {
-            Type = POWERUP_WEAPON;
-            SubType = WEAPON_GRENADE;
-        }
-        else if(Index == ENTITY_WEAPON_RIFLE)
-        {
-            Type = POWERUP_WEAPON;
-            SubType = WEAPON_RIFLE;
-        }
-        else if(Index == ENTITY_POWERUP_NINJA && g_Config.m_SvPowerups)
-        {
-            Type = POWERUP_NINJA;
-            SubType = WEAPON_NINJA;
-        }
-    }
-    /* end zCatch*/
+	else if(Index == ENTITY_ARMOR_1)
+		Type = POWERUP_ARMOR;
+	else if(Index == ENTITY_HEALTH_1)
+		Type = POWERUP_HEALTH;
+	else if(Index == ENTITY_WEAPON_SHOTGUN)
+	{
+		Type = POWERUP_WEAPON;
+		SubType = WEAPON_SHOTGUN;
+	}
+	else if(Index == ENTITY_WEAPON_GRENADE)
+	{
+		Type = POWERUP_WEAPON;
+		SubType = WEAPON_GRENADE;
+	}
+	else if(Index == ENTITY_WEAPON_RIFLE)
+	{
+		Type = POWERUP_WEAPON;
+		SubType = WEAPON_RIFLE;
+	}
+	else if(Index == ENTITY_POWERUP_NINJA && g_Config.m_SvPowerups)
+	{
+		Type = POWERUP_NINJA;
+		SubType = WEAPON_NINJA;
+	}
 
 	if(Type != -1)
 	{
@@ -176,11 +171,6 @@ bool IGameController::OnEntity(int Index, vec2 Pos)
 	return false;
 }
 
-bool IGameController::IsZCatch()
-{
-	return false;
-}
-
 void IGameController::EndRound()
 {
 	if(m_Warmup) // game can't end when we are running warmup