merge again? :o
authorkoda
Mon, 08 Nov 2010 23:59:21 +0100
changeset 4220 20b67364aef9
parent 4216 184181604092 (current diff)
parent 4219 4162db7c11bb (diff)
child 4221 a1bf0f6b0d65
merge again? :o
--- a/QTfrontend/statsPage.cpp	Mon Nov 08 23:58:59 2010 +0100
+++ b/QTfrontend/statsPage.cpp	Mon Nov 08 23:59:21 2010 +0100
@@ -195,7 +195,7 @@
             QString playername = playerinfo.mid(i + 1);
             QString image;
 
-            if (lastColor == c && playerPosition <= 2) playerPosition = 1;
+            if (lastColor == c) playerPosition--;
             lastColor = c;
 
             switch (playerPosition)
--- a/hedgewars/uConsts.pas	Mon Nov 08 23:58:59 2010 +0100
+++ b/hedgewars/uConsts.pas	Mon Nov 08 23:59:21 2010 +0100
@@ -354,6 +354,7 @@
     gfInfAttack          = $00100000;
     gfResetWeps          = $00200000;
     gfPerHogAmmo         = $00400000;
+    gfDisableWind        = $00800000;           // only lua for now
     // NOTE: When adding new game flags, ask yourself
     // if a "game start notice" would be useful. If so,
     // add one in uWorld.pas - look for "AddGoal".
--- a/hedgewars/uScript.pas	Mon Nov 08 23:58:59 2010 +0100
+++ b/hedgewars/uScript.pas	Mon Nov 08 23:59:21 2010 +0100
@@ -1061,6 +1061,7 @@
 ScriptSetInteger('gfInfAttack', gfInfAttack);
 ScriptSetInteger('gfResetWeps', gfResetWeps);
 ScriptSetInteger('gfPerHogAmmo', gfPerHogAmmo);
+ScriptSetInteger('gfDisableWind', gfDisableWind);
 
 ScriptSetInteger('gmLeft', gmLeft);
 ScriptSetInteger('gmRight', gmRight);
--- a/hedgewars/uTeams.pas	Mon Nov 08 23:58:59 2010 +0100
+++ b/hedgewars/uTeams.pas	Mon Nov 08 23:59:21 2010 +0100
@@ -275,15 +275,19 @@
 
 ResetKbd;
 
-cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed);
-// cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue throws 'Internal error 200502052' on Darwin
-// see http://mantis.freepascal.org/view.php?id=17714
-cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_1).QWordValue;
-if cWindSpeed.isNegative then
-    CWindSpeedf := -cWindSpeedf;
-g:= AddGear(0, 0, gtATSmoothWindCh, 0, _0, _0, 1);
-g^.Tag:= hwRound(cWindSpeed * 72 / cMaxWindSpeed);
+if (GameFlags and gfDisableWind) = 0 then
+    begin
+    cWindSpeed:= rndSign(GetRandom * 2 * cMaxWindSpeed);
+    // cWindSpeedf:= cWindSpeed.QWordValue / _1.QWordValue throws 'Internal error 200502052' on Darwin
+    // see http://mantis.freepascal.org/view.php?id=17714
+    cWindSpeedf:= SignAs(cWindSpeed,cWindSpeed).QWordValue / SignAs(_1,_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}
+    end;
+
 ApplyAmmoChanges(CurrentHedgehog^);
 
 if not CurrentTeam^.ExtDriven then SetBinds(CurrentTeam^.Binds);