Reduce calls to expensive operations in fire. Slightly alters fire behaviour, but should still be reasonable
authornemo
Tue, 13 Jul 2010 17:39:00 -0400
changeset 3640 54676a34b9ad
parent 3639 b5cdbcc89b61
child 3641 98319a621dc8
Reduce calls to expensive operations in fire. Slightly alters fire behaviour, but should still be reasonable
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon Jul 12 01:42:43 2010 +0200
+++ b/hedgewars/GSHandlers.inc	Tue Jul 13 17:39:00 2010 -0400
@@ -1765,10 +1765,13 @@
             // Standard fire
             if not sticky then
             begin
-                Gear^.Radius := 7;
-                AmmoShove(Gear, 4, 100);
-                Gear^.Radius := 1;
-                doMakeExplosion(gX, gY, 4, 0);//, EXPLNoDamage);
+                if ((GameTicks and $1) = 0) then
+                    begin
+                    Gear^.Radius := 7;
+                    AmmoShove(Gear, 4, 150);
+                    Gear^.Radius := 1;
+                    end
+                else if ((GameTicks and $3) = 3) then doMakeExplosion(gX, gY, 6, 0);//, EXPLNoDamage); 
                 //DrawExplosion(gX, gY, 4);
                 if ((GameTicks and $7) = 0) and (Random(2) = 0) then
                     for i:= 1 to Random(2)+1 do