Merge pull request #8224 from Robyt3/Server-Freeze-Initial-Fix

Fix freeze not working during first 50 server ticks
This commit is contained in:
Dennis Felsing 2024-04-17 00:34:56 +00:00 committed by GitHub
commit e142b2d526
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2167,7 +2167,7 @@ bool CCharacter::Freeze(int Seconds)
{
if(Seconds <= 0 || m_Core.m_Super || m_FreezeTime > Seconds * Server()->TickSpeed())
return false;
if(m_Core.m_FreezeStart < Server()->Tick() - Server()->TickSpeed())
if(m_FreezeTime == 0 || m_Core.m_FreezeStart < Server()->Tick() - Server()->TickSpeed())
{
m_Armor = 0;
m_FreezeTime = Seconds * Server()->TickSpeed();