fixed a compiler error and some warnings

This commit is contained in:
oy 2012-04-20 23:40:02 +02:00
parent 8e293d0e63
commit bcc1f4aef0
3 changed files with 26 additions and 1 deletions

View file

@ -5,6 +5,8 @@
#include <math.h>
#include "math.h" // mix
// ------------------------------------
template<typename T>

View file

@ -36,7 +36,7 @@ void CPickup::Tick()
// respawn
m_SpawnTick = -1;
if(m_Type == PICKUP_GRENADE | m_Type == PICKUP_SHOTGUN | m_Type == PICKUP_LASER)
if(m_Type == PICKUP_GRENADE || m_Type == PICKUP_SHOTGUN || m_Type == PICKUP_LASER)
GameServer()->CreateSound(m_Pos, SOUND_WEAPON_SPAWN);
}
else

View file

@ -376,6 +376,13 @@ void IGameController::OnPlayerReadyChange(CPlayer *pPlayer)
// all players are ready -> unpause the game
if(GetPlayersReadyState())
SetGameState(IGS_GAME_PAUSED, 0);
break;
case IGS_WARMUP_GAME:
case IGS_START_COUNTDOWN:
case IGS_END_MATCH:
case IGS_END_ROUND:
// not effected
break;
}
}
}
@ -650,6 +657,10 @@ void IGameController::Snap(int SnappingClient)
case IGS_END_MATCH:
pGameInfoObj->m_GameStateFlags |= GAMESTATEFLAG_GAMEOVER;
pGameInfoObj->m_GameStateTimer = Server()->Tick()-m_GameStartTick-10*Server()->TickSpeed()+m_GameStateTimer;
break;
case IGS_GAME_RUNNING:
// not effected
break;
}
if(m_SuddenDeath)
pGameInfoObj->m_GameStateFlags |= GAMESTATEFLAG_SUDDENDEATH;
@ -699,6 +710,11 @@ void IGameController::Tick()
CycleMap();
StartMatch();
m_MatchCount++;
break;
case IGS_WARMUP_GAME:
case IGS_GAME_RUNNING:
// not effected
break;
}
}
else
@ -715,6 +731,13 @@ void IGameController::Tick()
case IGS_GAME_PAUSED:
// freeze the game
++m_GameStartTick;
break;
case IGS_WARMUP_GAME:
case IGS_GAME_RUNNING:
case IGS_END_MATCH:
case IGS_END_ROUND:
// not effected
break;
}
}
}