fix/tweak let clouds reflect wind speed and direction again + stronger
authorsheepluva
Sun, 24 Oct 2010 22:00:36 +0200
changeset 3994 486da687d76a
parent 3992 283a6d17fc4b
child 3995 360332f8785f
fix/tweak let clouds reflect wind speed and direction again + stronger
hedgewars/VGSHandlers.inc
hedgewars/uTeams.pas
hedgewars/uVisualGears.pas
--- a/hedgewars/VGSHandlers.inc	Sun Oct 24 10:11:30 2010 -0400
+++ b/hedgewars/VGSHandlers.inc	Sun Oct 24 22:00:36 2010 +0200
@@ -77,7 +77,7 @@
 var s: Longword;
     t: float;
 begin
-Gear^.X:= Gear^.X + (cWindSpeedf * 200 + Gear^.dX) * Steps;
+Gear^.X:= Gear^.X + (cWindSpeedf * 750 * Gear^.dX) * Steps;
 
 // up-and-down-bounce magic
 s := (GameTicks + Gear^.Timer) mod 4096;
--- a/hedgewars/uTeams.pas	Sun Oct 24 10:11:30 2010 -0400
+++ b/hedgewars/uTeams.pas	Sun Oct 24 22:00:36 2010 +0200
@@ -270,6 +270,9 @@
 ResetKbd;
 
 cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed);
+cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue;
+if cWindSpeed.isNegative then
+    CWindSpeedf := -cWindSpeedf;
 g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
 g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
 {$IFDEF DEBUGFILE}AddFileLog('Wind = '+FloatToStr(cWindSpeed));{$ENDIF}
--- a/hedgewars/uVisualGears.pas	Sun Oct 24 10:11:30 2010 -0400
+++ b/hedgewars/uVisualGears.pas	Sun Oct 24 22:00:36 2010 +0200
@@ -172,8 +172,7 @@
                 end;
     vgtCloud: begin
                 Frame:= random(4);
-                dx:= 0.000005 * random(10000);
-                if random(2) = 0 then dx := -dx;
+                dx:= 0.5 + 0.1 * random(5); // how much the cloud will be affected by wind
                 timer:= random(4096);
                 end;
     vgtExplPart,