mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 09:13:45 +00:00
# Hotloading of actor XML files.
Stop ignoring actor XML animation speeds. Add decentralised registration of hotloaders. Move player ID storage into CModel, to simplify CUnit. Remove obsolete unit ID allocation code. Remove some material junk. This was SVN commit r7605.
This commit is contained in:
@@ -52,11 +52,18 @@ public:
|
||||
m_SimContext.m_Terrain = terrain;
|
||||
m_ComponentManager.LoadComponentTypes();
|
||||
|
||||
RegisterFileReloadFunc(ReloadChangedFileCB, this);
|
||||
|
||||
// m_EnableOOSLog = true; // TODO: this should be a command-line flag or similar
|
||||
|
||||
// (can't call ResetState here since the scripts haven't been loaded yet)
|
||||
}
|
||||
|
||||
~CSimulation2Impl()
|
||||
{
|
||||
UnregisterFileReloadFunc(ReloadChangedFileCB, this);
|
||||
}
|
||||
|
||||
CParamNode LoadXML(const std::wstring& name)
|
||||
{
|
||||
CParamNode ret;
|
||||
@@ -112,6 +119,11 @@ public:
|
||||
bool LoadScripts(const VfsPath& path);
|
||||
LibError ReloadChangedFile(const VfsPath& path);
|
||||
|
||||
static LibError ReloadChangedFileCB(void* param, const VfsPath& path)
|
||||
{
|
||||
return static_cast<CSimulation2Impl*>(param)->ReloadChangedFile(path);
|
||||
}
|
||||
|
||||
bool Update(int turnLength, const std::vector<SimulationCommand>& commands);
|
||||
void Interpolate(float frameLength, float frameOffset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user