diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 562c96722..7d1210c27 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -65,7 +65,7 @@ bool CCharacter::Spawn(CPlayer *pPlayer, vec2 Pos) m_ActiveWeapon = WEAPON_GUN; m_LastWeapon = WEAPON_HAMMER; m_QueuedWeapon = -1; - + m_CpActive = -2; m_pPlayer = pPlayer; m_Pos = Pos; m_OlderPos = Pos; @@ -657,7 +657,7 @@ void CCharacter::Tick() int cp = GameServer()->Collision()->IsCheckpoint(MapIndex); - if(cp != -1 && m_RaceState == RACE_STARTED) + if(cp != -1 && m_RaceState == RACE_STARTED && cp > m_CpActive) { m_CpActive = cp; m_CpCurrent[cp] = time; @@ -673,6 +673,7 @@ void CCharacter::Tick() if(((TileIndex1 == TILE_END) || (TileIndex2 == TILE_END)) && m_RaceState == RACE_STARTED) { char aBuf[128]; + m_CpActive=-2; str_format(aBuf, sizeof(aBuf), "%s finished in: %d minute(s) %5.2f second(s)", Server()->ClientName(m_pPlayer->GetCID()), (int)time/60, time-((int)time/60*60)); if(!g_Config.m_SvHideScore) GameServer()->SendChatTarget(m_pPlayer->GetCID(), aBuf);