diff --git a/_entWatch4/dump.txt b/_entWatch4/dump.txt new file mode 100644 index 0000000..c73df20 --- /dev/null +++ b/_entWatch4/dump.txt @@ -0,0 +1,41 @@ + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnPluginStart() +{ + if ((g_hGameConf = LoadGameConfigFile("entWatch.games")) == INVALID_HANDLE) + SetFailState("Couldn't load \"entWatch.games\" game config!"); + + ... +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) +{ + g_fRestartTime = 0.0; +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnRoundEnding(Event hEvent, const char[] sEvent, bool bDontBroadcast) +{ + g_fRestartTime = view_as(LoadFromAddress(GetGameRulesAddress() + view_as
(GameConfGetOffset(g_hGameConf, "RoundRestartTime")), NumberType_Int32)); +} + +//---------------------------------------------------------------------------------------------------- +// Purpose: +//---------------------------------------------------------------------------------------------------- +public void OnGameFrame() +{ + if (g_fRestartTime && g_fRestartTime <= GetGameTime()) + { + if (g_hArray_Items.Length) + g_hArray_Items.Clear(); + + g_fRestartTime = 0.0; + } +} \ No newline at end of file diff --git a/_entWatch4/scripting/entWatch-core.sp b/_entWatch4/scripting/entWatch-core.sp index a67859f..db846ed 100644 --- a/_entWatch4/scripting/entWatch-core.sp +++ b/_entWatch4/scripting/entWatch-core.sp @@ -177,10 +177,10 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) //---------------------------------------------------------------------------------------------------- public void OnRoundEnd(Event hEvent, const char[] sEvent, bool bDontBroadcast) { - g_bIntermission = true; - if (g_hArray_Items.Length) g_hArray_Items.Clear(); + + G_bIntermission = true; } //----------------------------------------------------------------------------------------------------