mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
fixed a crash, closes #56
This commit is contained in:
parent
457fee998d
commit
9c4b1c9892
|
@ -791,9 +791,10 @@ void IGameController::Snap(int SnappingClient)
|
||||||
//pGameInfoObj->m_TimeLimit = g_Config.m_SvTimelimit;
|
//pGameInfoObj->m_TimeLimit = g_Config.m_SvTimelimit;
|
||||||
CCharacter *pChar;
|
CCharacter *pChar;
|
||||||
CPlayer *pPlayer;
|
CPlayer *pPlayer;
|
||||||
if ((pPlayer = GameServer()->m_apPlayers[SnappingClient]))
|
if(SnappingClient >= 0)
|
||||||
if((pChar = pPlayer->GetCharacter()))
|
if((pPlayer = GameServer()->m_apPlayers[SnappingClient]))
|
||||||
pGameInfoObj->m_RoundStartTick = (pChar->m_DDRaceState == DDRACE_STARTED)?pChar->m_StartTime:Server()->Tick();
|
if((pChar = pPlayer->GetCharacter()))
|
||||||
|
pGameInfoObj->m_RoundStartTick = (pChar->m_DDRaceState == DDRACE_STARTED)?pChar->m_StartTime:Server()->Tick();
|
||||||
|
|
||||||
pGameInfoObj->m_RoundNum = /*(str_length(g_Config.m_SvMaprotation) && g_Config.m_SvRoundsPerMap) ? g_Config.m_SvRoundsPerMap :*/ 0;
|
pGameInfoObj->m_RoundNum = /*(str_length(g_Config.m_SvMaprotation) && g_Config.m_SvRoundsPerMap) ? g_Config.m_SvRoundsPerMap :*/ 0;
|
||||||
pGameInfoObj->m_RoundCurrent = m_RoundCount+1;
|
pGameInfoObj->m_RoundCurrent = m_RoundCount+1;
|
||||||
|
|
Loading…
Reference in a new issue