From 151834a948acaf7a07d1abffa61a111476eb73cf Mon Sep 17 00:00:00 2001
From: peace-maker <peace-maker@wcfan.de>
Date: Thu, 1 Dec 2016 18:09:48 -0700
Subject: [PATCH] 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.
---
 extensions/cstrike/timeleft.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/extensions/cstrike/timeleft.cpp b/extensions/cstrike/timeleft.cpp
index 87c59d49..5a28f491 100644
--- a/extensions/cstrike/timeleft.cpp
+++ b/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;
 		}