mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
penalty tiles can be used to get a time of 0:00:01, this is fixed by
letting the tees die, before that happens
This commit is contained in:
parent
cfdb97a422
commit
19ae17366d
|
@ -2679,7 +2679,7 @@ int CServer::Run()
|
|||
int NewTicks = 0;
|
||||
|
||||
// load new map TODO: don't poll this
|
||||
if(m_MapReload)
|
||||
if(m_MapReload || m_CurrentGameTick >= 0x6FFFFFFF) // force reload to make sure the ticks stay within a valid range
|
||||
{
|
||||
// load map
|
||||
if(LoadMap(Config()->m_SvMap))
|
||||
|
|
|
@ -718,6 +718,15 @@ void CCharacter::Tick()
|
|||
m_pPlayer->m_ForceBalanced = false;
|
||||
}*/
|
||||
|
||||
if(m_StartTime > Server()->Tick())
|
||||
{
|
||||
// Prevent the player from getting a negative time
|
||||
// The main reason why this can happen is because of time penalty tiles
|
||||
// However, other reasons are hereby also excluded
|
||||
GameServer()->SendChatTarget(m_pPlayer->GetCID(), "You died of old age");
|
||||
Die(m_pPlayer->GetCID(), WEAPON_WORLD);
|
||||
}
|
||||
|
||||
if(m_Paused)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue