# HG changeset patch
# User alfadur
# Date 1559504439 -10800
# Node ID 07de9e60c305f74e0caba0158c8f54b64480e223
# Parent  9397e07b308684ab65af3da15451045b3726e2df
fix land object placement

diff -r 9397e07b3086 -r 07de9e60c305 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;