cstrike: Fix wrong timeleft calculation#1072
cstrike: Fix wrong timeleft calculation#1072KyleSanderson merged 2 commits intoalliedmodders:masterfrom
Conversation
|
[8:18 PM] Moltard: "cstrike: Fix wrong timeleft calculation" |
KyleSanderson
left a comment
There was a problem hiding this comment.
Super minor - the problem case has definitely happened to us before.
extensions/cstrike/timeleft.cpp
Outdated
|
|
||
| float flGameStartTime = gpGlobals->curtime; | ||
| sm_sendprop_info_t info; | ||
| if (gamehelpers->FindSendPropInfo("CCSGameRulesProxy", "m_flGameStartTime", &info)) |
There was a problem hiding this comment.
Can you nest this under gamerules? Doesn't make sense to do the lookup if the variable is only used if gamerules is valid. Not that this is a hot path - just a nit.
* Fix wrong timeleft calculation * reorder function calls
* Fix wrong timeleft calculation * reorder function calls
* Fix wrong timeleft calculation * reorder function calls
(I actually forgot what exactly the buggy behavior was)