Skip to content

Commit

Permalink
Fix case of not calling OnMapTimeLeftChanged in CS:GO (#563)
Browse files Browse the repository at this point in the history
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
peace-maker authored and KyleSanderson committed Dec 2, 2016
1 parent ec9af8f commit 151834a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/cstrike/timeleft.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 151834a

Please sign in to comment.