Merge pull request #8150 from furo321/freezebar-fix

Fix freeze bar not being correct after returning from pause
This commit is contained in:
Dennis Felsing 2024-03-23 23:26:04 +00:00 committed by GitHub
commit 7e8dc57194
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -2263,12 +2263,17 @@ void CCharacter::Pause(bool Pause)
ResetHook();
GameWorld()->ReleaseHooked(GetPlayer()->GetCid());
}
m_PausedTick = Server()->Tick();
}
else
{
m_Core.m_Vel = vec2(0, 0);
GameServer()->m_World.m_Core.m_apCharacters[m_pPlayer->GetCid()] = &m_Core;
GameServer()->m_World.InsertEntity(this);
if(m_Core.m_FreezeStart > 0 && m_PausedTick >= 0)
{
m_Core.m_FreezeStart += Server()->Tick() - m_PausedTick;
}
}
}

View file

@ -104,6 +104,7 @@ private:
bool m_Alive;
bool m_Paused;
int m_PausedTick;
int m_NeededFaketuning;
// weapon info