minor simplification of conditions for not spawning a visual gear - also allows lua to spawn clouds critically or non-critically. We probably shouldn't even exempt clouds from this, and just spawn them once synced, but, eh, probably isn't a significant hit since sheepluva made the motion more efficient.
authornemo
Tue, 17 Apr 2018 15:21:52 -0400
changeset 13334 e8801220c13f
parent 13333 2489c36c61b7
child 13335 3f2ee2f9b51d
minor simplification of conditions for not spawning a visual gear - also allows lua to spawn clouds critically or non-critically. We probably shouldn't even exempt clouds from this, and just spawn them once synced, but, eh, probably isn't a significant hit since sheepluva made the motion more efficient.
hedgewars/uVisualGears.pas
hedgewars/uVisualGearsList.pas
--- a/hedgewars/uVisualGears.pas	Tue Apr 17 20:10:10 2018 +0200
+++ b/hedgewars/uVisualGears.pas	Tue Apr 17 15:21:52 2018 -0400
@@ -468,7 +468,7 @@
 var i: LongInt;
 begin
 for i:= 0 to cCloudsNumber - 1 do
-    AddVisualGear(cLeftScreenBorder + i * LongInt(cScreenSpace div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
+    AddVisualGear(cLeftScreenBorder + i * LongInt(cScreenSpace div (cCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud, 0, true)
 end;
 
 procedure ChangeToSDClouds;
@@ -489,7 +489,7 @@
             end
         else vg:= vg^.NextGear;
     for j:= 0 to cSDCloudsNumber - 1 do
-        AddVisualGear(cLeftScreenBorder + j * LongInt(cScreenSpace div (cSDCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud)
+        AddVisualGear(cLeftScreenBorder + j * LongInt(cScreenSpace div (cSDCloudsNumber + 1)), LAND_HEIGHT-1184, vgtCloud, 0, true)
     end;
 end;
 
--- a/hedgewars/uVisualGearsList.pas	Tue Apr 17 20:10:10 2018 +0200
+++ b/hedgewars/uVisualGearsList.pas	Tue Apr 17 15:21:52 2018 -0400
@@ -65,7 +65,7 @@
 AddVisualGear:= nil;
 if (GameType <> gmtRecord) and
    (((GameType = gmtSave) or (fastUntilLag and (GameType = gmtNet)) or fastScrolling) and // we are scrolling now
-   ((Kind <> vgtCloud) and (not Critical))) then
+   (not Critical)) then
        exit;
 
 if ((cReducedQuality and rqAntiBoom) <> 0) and