1
0
forked from 0ad/0ad

# Fixed crash when saving in actor editor

This was SVN commit r4788.
This commit is contained in:
Ykkrosh 2007-01-18 15:29:12 +00:00
parent ad204e16c9
commit 8da71a84a7
3 changed files with 7 additions and 1 deletions

View File

@ -102,6 +102,11 @@ CUnit* ActorViewer::GetUnit()
return m.Unit;
}
void ActorViewer::UnloadObjects()
{
m.ObjectManager.UnloadObjects();
}
void ActorViewer::SetActor(const CStrW& id, const CStrW& animation)
{
bool needsAnimReload = false;

View File

@ -13,6 +13,7 @@ public:
~ActorViewer();
void SetActor(const CStrW& id, const CStrW& animation);
void UnloadObjects();
CUnit* GetUnit();
void SetBackgroundColour(const SColor4ub& colour);
void SetWalkEnabled(bool enabled);

View File

@ -117,7 +117,7 @@ MESSAGEHANDLER(SetActorViewer)
// Should replace this with proper actor hot-loading system, or something.
View::GetView_Actor()->GetActorViewer().SetActor(L"", L"");
g_Game->GetView()->GetObjectManager().UnloadObjects();
View::GetView_Actor()->GetActorViewer().UnloadObjects();
vfs_reload_changed_files();
}
View::GetView_Actor()->SetSpeedMultiplier(msg->speed);