mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-26 17:52:50 +00:00
Add some tests for UnitAI.
Fix said tests for UnitAI. Hopefully fix #647 too. Document HFSM interface a bit. Add Engine.DumpSimState() console command for debugging. This was SVN commit r8681.
This commit is contained in:
@@ -379,6 +379,13 @@ void ForceGC(void* cbdata)
|
||||
g_Console->InsertMessage(L"Garbage collection completed in: %f", time);
|
||||
}
|
||||
|
||||
void DumpSimState(void* UNUSED(cbdata))
|
||||
{
|
||||
fs::wpath path (psLogDir()/L"sim_dump.txt");
|
||||
std::ofstream file (path.external_file_string().c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||
g_Game->GetSimulation2()->DumpDebugState(file);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void GuiScriptingInit(ScriptInterface& scriptInterface)
|
||||
@@ -430,4 +437,5 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
|
||||
scriptInterface.RegisterFunction<int, &Crash>("Crash");
|
||||
scriptInterface.RegisterFunction<void, &DebugWarn>("DebugWarn");
|
||||
scriptInterface.RegisterFunction<void, &ForceGC>("ForceGC");
|
||||
scriptInterface.RegisterFunction<void, &DumpSimState>("DumpSimState");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user