[colobot] 119/145: Fixed dynamic textures not being reloaded properly

Didier Raboud odyx at moszumanska.debian.org
Mon Jul 11 12:56:24 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit bd4362e26ca9d2259864e5d997dfac2196ce6049
Author: krzys-h <krzys_h at interia.pl>
Date:   Sun Jun 19 19:57:55 2016 +0200

    Fixed dynamic textures not being reloaded properly
---
 src/graphics/engine/engine.cpp | 3 ++-
 src/level/robotmain.cpp        | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index ac5cf52..7fdb2a4 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -375,7 +375,8 @@ void CEngine::ReloadAllTextures()
 
     m_app->GetEventQueue()->AddEvent(Event(EVENT_RELOAD_TEXTURES));
     UpdateGroundSpotTextures();
-    LoadAllTextures();
+    // LoadAllTextures() is called from CRobotMain on EVENT_RELOAD_TEXTURES
+    // This is required because all dynamic textures need to be loaded first
 
     // recapture 3D scene
     if (m_worldCaptured)
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 760d1d5..d0f29ef 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -689,6 +689,7 @@ bool CRobotMain::ProcessEvent(Event &event)
             ChangeColor();
             UpdateMap();
         }
+        m_engine->LoadAllTextures();
     }
 
     if (event.type == EVENT_RESOLUTION_CHANGED)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list