# HG changeset patch # User nemo # Date 1523992912 14400 # Node ID e8801220c13fb0fe5690e2ce18b86eb5643e49ac # Parent 2489c36c61b7b628a02816a0020b2dceb405a8fa 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. diff -r 2489c36c61b7 -r e8801220c13f hedgewars/uVisualGears.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; diff -r 2489c36c61b7 -r e8801220c13f hedgewars/uVisualGearsList.pas --- 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