mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Clamp /emote duration
/home/teeworlds/src/master/src/game/server/ddracechat.cpp:1108:65: runtime error: signed integer overflow: 99999999 * 50 cannot be represented in type 'int'
This commit is contained in:
parent
c1dea54d80
commit
655bbd2cb6
|
@ -1103,7 +1103,7 @@ void CGameContext::ConEyeEmote(IConsole::IResult *pResult, void *pUserData)
|
|||
|
||||
int Duration = 1;
|
||||
if(pResult->NumArguments() > 1)
|
||||
Duration = pResult->GetInteger(1);
|
||||
Duration = clamp(pResult->GetInteger(1), 1, 86400);
|
||||
|
||||
pPlayer->m_DefEmoteReset = pSelf->Server()->Tick() + Duration * pSelf->Server()->TickSpeed();
|
||||
pPlayer->m_LastEyeEmote = pSelf->Server()->Tick();
|
||||
|
|
Loading…
Reference in a new issue