mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
VScript_GetGlobalFunction is worthless garbage
This commit is contained in:
parent
1376f3b6ba
commit
52df730a4f
@ -2287,6 +2287,7 @@ public any Native_SaveCheckpointCache(Handle plugin, int numParams)
|
|||||||
return SetNativeArray(3, cache, sizeof(cp_cache_t));
|
return SetNativeArray(3, cache, sizeof(cp_cache_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is called after mapspawn.nut for reference. (Which is before OnMapStart() too)
|
||||||
public void VScript_OnScriptVMInitialized()
|
public void VScript_OnScriptVMInitialized()
|
||||||
{
|
{
|
||||||
delete gH_VScript_Timer_OnCheckpointSave;
|
delete gH_VScript_Timer_OnCheckpointSave;
|
||||||
@ -2294,15 +2295,15 @@ public void VScript_OnScriptVMInitialized()
|
|||||||
delete gH_VScript_Timer_OnCheckpointLoadPost;
|
delete gH_VScript_Timer_OnCheckpointLoadPost;
|
||||||
|
|
||||||
// ::Timer_OnCheckpointSave <- function(player)
|
// ::Timer_OnCheckpointSave <- function(player)
|
||||||
if (VScript_GetGlobalFunction("Timer_OnCheckpointSave"))
|
if (HSCRIPT_RootTable.ValueExists("Timer_OnCheckpointSave"))
|
||||||
gH_VScript_Timer_OnCheckpointSave = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointSave"));
|
gH_VScript_Timer_OnCheckpointSave = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointSave"));
|
||||||
|
|
||||||
// ::Timer_OnCheckpointLoadPre <- function(player)
|
// ::Timer_OnCheckpointLoadPre <- function(player)
|
||||||
if (VScript_GetGlobalFunction("Timer_OnCheckpointLoadPre"))
|
if (HSCRIPT_RootTable.ValueExists("Timer_OnCheckpointLoadPre"))
|
||||||
gH_VScript_Timer_OnCheckpointLoadPre = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointLoadPre"));
|
gH_VScript_Timer_OnCheckpointLoadPre = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointLoadPre"));
|
||||||
|
|
||||||
// ::Timer_OnCheckpointLoadPost <- function(player)
|
// ::Timer_OnCheckpointLoadPost <- function(player)
|
||||||
if (VScript_GetGlobalFunction("Timer_OnCheckpointLoadPost"))
|
if (HSCRIPT_RootTable.ValueExists("Timer_OnCheckpointLoadPost"))
|
||||||
gH_VScript_Timer_OnCheckpointLoadPost = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointLoadPost"));
|
gH_VScript_Timer_OnCheckpointLoadPost = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnCheckpointLoadPost"));
|
||||||
|
|
||||||
// function Timer_SetCheckpointCustomData(player, key, value)
|
// function Timer_SetCheckpointCustomData(player, key, value)
|
||||||
|
|||||||
@ -3926,17 +3926,18 @@ void UpdateStyleSettings(int client)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is called after mapspawn.nut for reference. (Which is before OnMapStart() too)
|
||||||
public void VScript_OnScriptVMInitialized()
|
public void VScript_OnScriptVMInitialized()
|
||||||
{
|
{
|
||||||
delete gH_VScript_OnStart;
|
delete gH_VScript_OnStart;
|
||||||
delete gH_VScript_OnFinish;
|
delete gH_VScript_OnFinish;
|
||||||
|
|
||||||
// ::Timer_OnStart <- function(player)
|
// ::Timer_OnStart <- function(player)
|
||||||
if (VScript_GetGlobalFunction("Timer_OnStart"))
|
if (HSCRIPT_RootTable.ValueExists("Timer_OnStart"))
|
||||||
gH_VScript_OnStart = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnStart"));
|
gH_VScript_OnStart = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnStart"));
|
||||||
|
|
||||||
// ::Timer_OnFinish <- function(player)
|
// ::Timer_OnFinish <- function(player)
|
||||||
if (VScript_GetGlobalFunction("Timer_OnFinish"))
|
if (HSCRIPT_RootTable.ValueExists("Timer_OnFinish"))
|
||||||
gH_VScript_OnFinish = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnFinish"));
|
gH_VScript_OnFinish = new VScriptExecute(HSCRIPT_RootTable.GetValue("Timer_OnFinish"));
|
||||||
|
|
||||||
// function Timer_GetTime(player) // returns a float
|
// function Timer_GetTime(player) // returns a float
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user