entWatch4: Dump some left over code.

This commit is contained in:
zaCade 2018-09-18 12:35:03 +02:00
parent 6276a6cf88
commit a9b375ac4d
2 changed files with 43 additions and 2 deletions

41
_entWatch4/dump.txt Normal file
View File

@ -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<float>(LoadFromAddress(GetGameRulesAddress() + view_as<Address>(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;
}
}

View File

@ -177,10 +177,10 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
public void OnRoundEnd(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) if (g_hArray_Items.Length)
g_hArray_Items.Clear(); g_hArray_Items.Clear();
G_bIntermission = true;
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------