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.
--- 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