Fewer bubbles for non-breathing gears
authornemo
Sun, 05 Jul 2009 13:44:11 +0000
changeset 2225 162d8f6bca25
parent 2224 4f3e7bd31841
child 2226 e35b62cb7a1c
Fewer bubbles for non-breathing gears
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sun Jul 05 13:39:05 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Jul 05 13:44:11 2009 +0000
@@ -94,7 +94,11 @@
 Gear^.Y:= Gear^.Y + cDrownSpeed;
 if hwRound(Gear^.Y) > Gear^.Radius + cWaterLine + cVisibleWater then DeleteGear(Gear);
 // Create some bubbles (0.5% might be better but causes too few bubbles sometimes)
-if Random(1000) < 10 then AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble);
+if (GameTicks and $1F) = 0 then
+    if (Gear^.Kind = gtHedgehog) and (Random(4) = 0) then 
+        AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
+    else if Random(12) = 0 then
+        AddVisualGear(hwRound(Gear^.X) - Gear^.Radius, hwRound(Gear^.Y) - Gear^.Radius, vgtBubble)
 end;
 
 ////////////////////////////////////////////////////////////////////////////////