[colobot] 211/390: Fixed texture recoloring reset

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:21:47 UTC 2015


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

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit dbdaecd1e88e87255614e205b0bdf718b137ec81
Author: krzys-h <krzys_h at interia.pl>
Date:   Tue Nov 11 15:30:49 2014 +0100

    Fixed texture recoloring reset
    
    Partially fixes #218
---
 src/graphics/engine/engine.cpp | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 6e1da09..cd975ab 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -2429,18 +2429,8 @@ bool CEngine::ChangeTextureColor(const std::string& texName,
                                  Math::Point ts, Math::Point ti,
                                  Math::Point *exclude, float shift, bool hsv)
 {
-    if (colorRef1.r == colorNew1.r &&
-        colorRef1.g == colorNew1.g &&
-        colorRef1.b == colorNew1.b &&
-        colorRef2.r == colorNew2.r &&
-        colorRef2.g == colorNew2.g &&
-        colorRef2.b == colorNew2.b)
-        return true;
-
-
     DeleteTexture(texName);
 
-
     CImage img;
     if (!img.Load(texName))
     {
@@ -2449,6 +2439,14 @@ bool CEngine::ChangeTextureColor(const std::string& texName,
         m_texBlacklist.insert(texName);
         return false;
     }
+    
+    if (colorRef1.r == colorNew1.r &&
+        colorRef1.g == colorNew1.g &&
+        colorRef1.b == colorNew1.b &&
+        colorRef2.r == colorNew2.r &&
+        colorRef2.g == colorNew2.g &&
+        colorRef2.b == colorNew2.b)
+        return true;
 
 
     int dx = img.GetSize().x;

-- 
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