hedgewars/uLandObjects.pas
changeset 15104 07de9e60c305
parent 15032 88e3d1ff67bb
child 15147 d97f0b96e45f
--- a/hedgewars/uLandObjects.pas	Sun Jun 02 22:25:41 2019 +0300
+++ b/hedgewars/uLandObjects.pas	Sun Jun 02 22:40:39 2019 +0300
@@ -171,9 +171,10 @@
                     or (LerpByte((color and BMask) shr BShift, (landColor and BMask) shr BShift, alpha) shl BShift)
                     or (LerpByte(alpha, 255, (color and AMask) shr AShift) shl AShift);
 
-            if Land[cpY + y, cpX + x] <= lfAllObjMask then
-                Land[cpY + y, cpX + x]:= lfObject or LandFlags
             end;
+
+        if ((color and AMask) <> 0) and (Land[cpY + y, cpX + x] <= lfAllObjMask) then
+            Land[cpY + y, cpX + x]:= lfObject or LandFlags
         end;
     p:= PLongwordArray(@(p^[Image^.pitch shr 2]))
     end;