Permalink
Browse files

Fix case of not calling OnMapTimeLeftChanged in CS:GO (#563)

Round end reasons in CS:GO are +1 from the ones in CS:S. The
CSRoundEnd_GameStart reason for when the OnMapTimeLeftChanged forward
should be called should be one higher than in CS:S.
  • Loading branch information...
1 parent ec9af8f commit 151834a948acaf7a07d1abffa61a111476eb73cf @peace-maker peace-maker committed with KyleSanderson Dec 2, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0 extensions/cstrike/timeleft.cpp
@@ -65,7 +65,11 @@ void TimeLeftEvents::FireGameEvent(IGameEvent *event)
}
else if (strcmp(name, "round_end") == 0)
{
+#if SOURCE_ENGINE == SE_CSGO
+ if (event->GetInt("reason") == 16)
+#else
if (event->GetInt("reason") == 15)
+#endif
{
get_new_timeleft_offset = true;
}

0 comments on commit 151834a

Please sign in to comment.