pick up trunk changes (AI, encoding) 0.9.20
authornemo
Tue, 24 Dec 2013 17:00:17 -0500
branch0.9.20
changeset 9847 d19a8831d46a
parent 9843 7918943c0ff1 (current diff)
parent 9846 4dc7cb571e1d (diff)
child 9848 2b8f928faa14
pick up trunk changes (AI, encoding)
--- a/QTfrontend/ui/page/pagemain.cpp	Wed Dec 25 00:55:26 2013 +0400
+++ b/QTfrontend/ui/page/pagemain.cpp	Tue Dec 24 17:00:17 2013 -0500
@@ -183,6 +183,7 @@
         QFile file(tipFile);
         file.open(QIODevice::ReadOnly);
         QTextStream in(&file);
+        in.setCodec("UTF-8");
         QString line = in.readLine();
         int tip_platform = 0;
         while (!line.isNull()) {
--- a/hedgewars/uAI.pas	Wed Dec 25 00:55:26 2013 +0400
+++ b/hedgewars/uAI.pas	Tue Dec 24 17:00:17 2013 -0500
@@ -251,7 +251,7 @@
     AddAction(Actions, aia_Weapon, Longword(amSkip), 100 + random(200), 0, 0);
 
 if ((CurrentHedgehog^.MultiShootAttacks = 0) or ((Ammoz[Me^.Hedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NoMoveAfter) = 0))
-    and (GameFlags and gfArtillery = 0) then
+    and (GameFlags and gfArtillery = 0) and (cGravityf <> 0) then
     begin
     tmp:= random(2) + 1;
     Push(0, Actions, Me^, tmp);
--- a/hedgewars/uAIAmmoTests.pas	Wed Dec 25 00:55:26 2013 +0400
+++ b/hedgewars/uAIAmmoTests.pas	Tue Dec 24 17:00:17 2013 -0500
@@ -1047,7 +1047,7 @@
 begin
 ap.ExplR:= 0;
 ap.Time:= 0;
-if (Level > 3) then
+if (Level > 3) or (cGravityf = 0) then
     exit(BadTurn);
 
 ap.Angle:= 0;