diff options
| author | Teetime <anton.tsoulos@yahoo.de> | 2011-07-03 16:42:29 +0200 |
|---|---|---|
| committer | Teetime <anton.tsoulos@yahoo.de> | 2011-07-03 16:42:29 +0200 |
| commit | de7c2a5f47cc1c854e6210ba056888e7a7ae7a08 (patch) | |
| tree | 8b1c1cbf8d54fd554d06a1b989b12e51280b55a8 /src/game/server/gamecontroller.cpp | |
| parent | 76594f348fc01ef3cad44fc4536dbb732a8ca653 (diff) | |
| download | zcatch-de7c2a5f47cc1c854e6210ba056888e7a7ae7a08.tar.gz zcatch-de7c2a5f47cc1c854e6210ba056888e7a7ae7a08.zip | |
Added general zCatch-Support
Diffstat (limited to 'src/game/server/gamecontroller.cpp')
| -rw-r--r-- | src/game/server/gamecontroller.cpp | 58 |
1 files changed, 34 insertions, 24 deletions
diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index f0facb8c..56407a77 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -136,30 +136,35 @@ 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; - 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; - } + /* zCatch */ + else if(!GameServer()->m_pController->IsZCatch() || g_Config.m_SvMode == 0) + { + 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*/ if(Type != -1) { @@ -171,6 +176,11 @@ 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 |