- Allow snow to drop a bit outside the map, where it already is allowed to spawn
authorunc0rr
Tue, 28 Jun 2011 17:12:09 +0400
changeset 5340 6963e37f2dd2
parent 5338 dbe8a4ea8521
child 5342 1868c2dc0284
child 5343 ff7ecf483759
- Allow snow to drop a bit outside the map, where it already is allowed to spawn - Tiny optimization
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Tue Jun 28 16:12:39 2011 +0400
+++ b/hedgewars/GSHandlers.inc	Tue Jun 28 17:12:09 2011 +0400
@@ -625,7 +625,7 @@
             end;
     // move back to cloud layer
         if yy > cWaterLine then move:= true
-        else if ((yy and LAND_HEIGHT_MASK) <> 0) or ((xx and LAND_WIDTH_MASK) <> 0) then move:=true
+        else if ((yy and LAND_HEIGHT_MASK) <> 0) or (xx > LAND_WIDTH + 512) or (xx < -512) then move:=true
         // Solid pixel encountered
         else if (Land[yy, xx] <> 0) then
             begin
@@ -4534,7 +4534,7 @@
     Gear^.Y:= Gear^.Y + Gear^.dY;
     Gear^.dX := Gear^.dX + cWindSpeed / 4;
     Gear^.dY := Gear^.dY + cGravity / 100;
-    if (GameTicks mod 250) = 0 then
+    if (GameTicks and $FF) = 0 then
         doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, Gear^.Hedgehog, EXPLDontDraw or EXPLNoGfx or EXPLNoDamage or EXPLDoNotTouchAny or EXPLPoisoned);
     AllInactive:= false;
 end;