summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index e14af78..733bf6b 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -34,7 +34,7 @@
#include "graphics/engine/engine.h"
#include "graphics/engine/lightman.h"
#include "graphics/engine/lightning.h"
-#include "graphics/engine/modelfile.h"
+#include "graphics/engine/modelmanager.h"
#include "graphics/engine/particle.h"
#include "graphics/engine/planet.h"
#include "graphics/engine/pyro.h"
@@ -1047,6 +1047,7 @@ void CRobotMain::ChangePhase(Phase phase)
FlushDisplayInfo();
m_engine->SetRankView(0);
m_engine->DeleteAllObjects();
+ Gfx::CModelManager::GetInstancePointer()->DeleteAllModelCopies();
m_engine->SetWaterAddColor(Gfx::Color(0.0f, 0.0f, 0.0f, 0.0f));
m_engine->SetBackground("");
m_engine->SetBackForce(false);
@@ -3736,6 +3737,7 @@ void CRobotMain::ScenePerso()
{
DeleteAllObjects(); // removes all the current 3D Scene
m_engine->DeleteAllObjects();
+ Gfx::CModelManager::GetInstancePointer()->DeleteAllModelCopies();
m_terrain->FlushRelief(); // all flat
m_terrain->FlushBuildingLevel();
m_terrain->FlushFlyingLimit();