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:
c0d3d3v 2022-05-30 16:04:15 +02:00
parent cfdb97a422
commit 19ae17366d
No known key found for this signature in database
GPG key ID: 068AF680530DFF31
2 changed files with 10 additions and 1 deletions

View file

@ -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))

View file

@ -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;