Only check alpha channel like BlitImageAndGenerateCollisionInfo does
authorunc0rr
Thu, 13 Feb 2014 23:53:47 +0400
changeset 10138 1a71d28392cb
parent 10137 a4537aab4117
child 10139 9046f69dae4c
Only check alpha channel like BlitImageAndGenerateCollisionInfo does
hedgewars/uLandGraphics.pas
--- a/hedgewars/uLandGraphics.pas	Thu Feb 13 23:38:16 2014 +0400
+++ b/hedgewars/uLandGraphics.pas	Thu Feb 13 23:53:47 2014 +0400
@@ -620,7 +620,7 @@
     4: for y:= 0 to Pred(h) do
         begin
         for x:= 0 to Pred(w) do
-            if (PLongword(@(p^[x * 4]))^) <> 0 then
+            if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then
                 if ((cpY + y) <= Longint(topY)) or ((cpY + y) >= LAND_HEIGHT) or
                    ((cpX + x) <= Longint(leftX)) or ((cpX + x) >= Longint(rightX)) or (Land[cpY + y, cpX + x] <> 0) then
                     begin
@@ -646,7 +646,7 @@
     4: for y:= 0 to Pred(h) do
         begin
         for x:= 0 to Pred(w) do
-            if (PLongword(@(p^[x * 4]))^) <> 0 then
+            if ((PLongword(@(p^[x * 4]))^) and AMask) <> 0 then
                    begin
                 if (cReducedQuality and rqBlurryLand) = 0 then
                     begin