Skip to content

Commit 1c6cab5

Browse files
jjustnsNico8340tederis
authored
Fixes getTimerDetails negative remaining duration (#3663)
* Fixes negative numbers Fixes negative remaining duration in current timer, remaining should always be 0 * Return in single statement Co-authored-by: Nico <[email protected]> * 0 > 0LL --------- Co-authored-by: Nico <[email protected]> Co-authored-by: TEDERIs <[email protected]>
1 parent 09e8350 commit 1c6cab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Shared/mods/deathmatch/logic/lua/CLuaTimer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ CTickCount CLuaTimer::GetTimeLeft()
6868
{
6969
CTickCount llCurrentTime = CTickCount::Now();
7070
CTickCount llTimeLeft = m_llStartTime + m_llDelay - llCurrentTime;
71-
return llTimeLeft;
71+
return llTimeLeft.ToLongLong() < 0LL ? CTickCount(0LL) : llTimeLeft;
7272
}

0 commit comments

Comments
 (0)