fix land object placement
authoralfadur
Sun, 02 Jun 2019 22:40:39 +0300
changeset 15104 07de9e60c305
parent 15103 9397e07b3086
child 15105 3acd4a20c414
fix land object placement
hedgewars/uLandObjects.pas
--- 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;