aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/scripts/scriptdatatables.cpp
diff options
context:
space:
mode:
authorBobTheBob <for.oliver.kirkham@gmail.com>2023-03-07 15:03:16 +0000
committerBobTheBob <for.oliver.kirkham@gmail.com>2023-03-07 15:03:16 +0000
commit946ab08b068c4d0b575724bb2c038f4a87f80b73 (patch)
treea02f3e941ff5804644c5ba6c2b4a8e6fad076b18 /NorthstarDLL/scripts/scriptdatatables.cpp
parentc6fdbc83b74a57bac91372f028f2dd9b8b74ffd6 (diff)
downloadNorthstarLauncher-946ab08b068c4d0b575724bb2c038f4a87f80b73.tar.gz
NorthstarLauncher-946ab08b068c4d0b575724bb2c038f4a87f80b73.zip
clear datatable cache
Diffstat (limited to 'NorthstarDLL/scripts/scriptdatatables.cpp')
-rw-r--r--NorthstarDLL/scripts/scriptdatatables.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/NorthstarDLL/scripts/scriptdatatables.cpp b/NorthstarDLL/scripts/scriptdatatables.cpp
index b050ff8d..94cfbf7f 100644
--- a/NorthstarDLL/scripts/scriptdatatables.cpp
+++ b/NorthstarDLL/scripts/scriptdatatables.cpp
@@ -885,6 +885,11 @@ void ConCommand_dump_datatables(const CCommand& args)
DumpDatatable(datatable);
}
+void ConCommand_ns_cleardatatablecache(const CCommand& args)
+{
+ CSVCache.clear();
+}
+
ON_DLL_LOAD_RELIESON("server.dll", ServerScriptDatatables, ServerSquirrel, (CModule module))
{
SQ_GetDatatableInternal<ScriptContext::SERVER> = module.Offset(0x1250f0).As<Datatable* (*)(HSquirrelVM*)>();
@@ -906,4 +911,5 @@ ON_DLL_LOAD_RELIESON("engine.dll", SharedScriptDataTables, ConVar, (CModule modu
RegisterConCommand("dump_datatables", ConCommand_dump_datatables, "dumps all datatables from a hardcoded list", FCVAR_NONE);
RegisterConCommand("dump_datatable", ConCommand_dump_datatable, "dump a datatable", FCVAR_NONE);
+ RegisterConCommand("ns_cleardatatablecache", ConCommand_ns_cleardatatablecache, "clears script datatable cache", FCVAR_NONE);
}