mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
fixed a compiler error and some warnings
This commit is contained in:
parent
8e293d0e63
commit
bcc1f4aef0
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
#include "math.h" // mix
|
||||
|
||||
// ------------------------------------
|
||||
|
||||
template<typename T>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue