mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
clamp m_Armor, to prevent value correction on client side
This commit is contained in:
parent
4281df2429
commit
706a06d4d4
|
@ -2063,7 +2063,7 @@ void CCharacter::SetRescue()
|
|||
void CCharacter::DDRaceTick()
|
||||
{
|
||||
mem_copy(&m_Input, &m_SavedInput, sizeof(m_Input));
|
||||
m_Armor = (m_FreezeTime >= 0) ? 10 - (m_FreezeTime / 15) : 0;
|
||||
m_Armor = (m_FreezeTime >= 0) ? clamp(10 - (m_FreezeTime / 15), 0, 10) : 0;
|
||||
if(m_Input.m_Direction != 0 || m_Input.m_Jump != 0)
|
||||
m_LastMove = Server()->Tick();
|
||||
|
||||
|
|
Loading…
Reference in a new issue