merge. hate the fact that "unsynced remote changes" is just a "note" now.
authornemo
Tue, 26 Mar 2013 17:52:27 -0400
changeset 8777 cce79a042cfc
parent 8774 39754516eee6
child 8795 b5b79a8f9354
merge. hate the fact that "unsynced remote changes" is just a "note" now.
CREDITS
QTfrontend/HWApplication.cpp
gameServer/Utils.hs
hedgewars/SDLh.pas
hedgewars/uAIAmmoTests.pas
hedgewars/uAIMisc.pas
hedgewars/uWorld.pas
--- a/CREDITS	Tue Mar 26 17:47:06 2013 -0400
+++ b/CREDITS	Tue Mar 26 17:52:27 2013 -0400
@@ -6,6 +6,13 @@
 - see Fonts_LICENSE.txt
 
 ==========
+= FORTS
+==========
+- Carlos Vives -> Tank (2010)
+- Dragonfly -> EvilChicken (2010)
+- Randy Broda -> SteelTower (2013)
+
+==========
 = HATS
 ==========
 - Robinator -> Terminator (2010)
@@ -66,4 +73,4 @@
      http://www.freesound.org/people/Jovica/sounds/38317/
 
 
-ALL OTHER CONTENT IS PROPERTY OF Andrey Korotaev <unC0Rr@gmail.com> UNLESS OTHERWISE SPECIFIED
\ No newline at end of file
+ALL OTHER CONTENT IS PROPERTY OF Andrey Korotaev <unC0Rr@gmail.com> UNLESS OTHERWISE SPECIFIED
--- a/QTfrontend/HWApplication.cpp	Tue Mar 26 17:47:06 2013 -0400
+++ b/QTfrontend/HWApplication.cpp	Tue Mar 26 17:52:27 2013 -0400
@@ -83,6 +83,8 @@
             return true;
         } else if (scheme == "hwplay") {
             int port = openEvent->url().port(NETGAME_DEFAULT_PORT);
+            if (address == "")
+                address = "netserver.hedgewars.org";
             form->NetConnectQuick(address, (quint16) port);
             return true;
         } else {
--- a/gameServer/Utils.hs	Tue Mar 26 17:47:06 2013 -0400
+++ b/gameServer/Utils.hs	Tue Mar 26 17:52:27 2013 -0400
@@ -56,7 +56,7 @@
             t : replaceTeam tm ts
 
 illegalName :: B.ByteString -> Bool
-illegalName s = B.null s || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
+illegalName s = B.null s || B.length s > 40 || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
     where
         isIllegalChar c = c `List.elem` "$()*+?[]^{|}"
 
--- a/hedgewars/SDLh.pas	Tue Mar 26 17:47:06 2013 -0400
+++ b/hedgewars/SDLh.pas	Tue Mar 26 17:52:27 2013 -0400
@@ -36,8 +36,10 @@
 
 {$IFDEF UNIX}
     {$IFNDEF DARWIN}
-        {necessary for statically linking physfs (divdi3 undefined)}
-        {$linklib stdc++}
+        {necessary for statically linking physfs (divdi3 undefined on 32 bit)}
+        {$IFDEF CPU32}
+            {$linklib stdc++}
+        {$ENDIF}
     {$ENDIF}
     {$IFDEF HAIKU}
         {$linklib root}
--- a/hedgewars/uAIAmmoTests.pas	Tue Mar 26 17:47:06 2013 -0400
+++ b/hedgewars/uAIAmmoTests.pas	Tue Mar 26 17:52:27 2013 -0400
@@ -197,6 +197,8 @@
     x, y, dX, dY: real;
     t: LongInt;
     value: LongInt;
+    t2: real;
+    timer: Longint;
 begin
     mX:= hwFloat2Float(Me^.X);
     mY:= hwFloat2Float(Me^.Y);
@@ -224,7 +226,25 @@
                 dec(t)
             until (((Me = CurrentHedgehog^.Gear) and TestColl(trunc(x), trunc(y), 5)) or 
                    ((Me <> CurrentHedgehog^.Gear) and TestCollExcludingMe(Me, trunc(x), trunc(y), 5))) or (y > cWaterLine);
-            
+
+            if TestCollWithLand(trunc(x), trunc(y), 5) then
+                begin
+                timer := 500;
+                t2 := 0.5 / sqrt(sqr(dX) + sqr(dY));
+                dX := dX * t2;
+                dY := dY * t2;
+                repeat
+                    x:= x + dX;
+                    y:= y + dY;
+                    dec(timer);
+                until (Abs(Targ.X - trunc(x)) + Abs(Targ.Y - trunc(y)) < 5)
+                    or (x < 0)
+                    or (y < 0)
+                    or (trunc(x) > LAND_WIDTH)
+                    or (trunc(y) > LAND_HEIGHT)
+                    or not TestCollWithLand(trunc(x), trunc(y), 5)
+                    or (timer = 0)
+                end;
             EX:= trunc(x);
             EY:= trunc(y);
             if Level = 1 then
--- a/hedgewars/uAIMisc.pas	Tue Mar 26 17:47:06 2013 -0400
+++ b/hedgewars/uAIMisc.pas	Tue Mar 26 17:52:27 2013 -0400
@@ -64,6 +64,7 @@
 function  TestCollExcludingObjects(x, y, r: LongInt): boolean; inline;
 function  TestCollExcludingMe(Me: PGear; x, y, r: LongInt): boolean; inline;
 function  TraceShoveFall(x, y, dX, dY: Real): LongInt;
+function TestCollWithLand(x, y, r: LongInt): boolean; inline;
 
 function  RateExplosion(Me: PGear; x, y, r: LongInt): LongInt; inline;
 function  RateExplosion(Me: PGear; x, y, r: LongInt; Flags: LongWord): LongInt;
--- a/hedgewars/uWorld.pas	Tue Mar 26 17:47:06 2013 -0400
+++ b/hedgewars/uWorld.pas	Tue Mar 26 17:52:27 2013 -0400
@@ -74,7 +74,7 @@
     timeTexture: PTexture;
     FPS: Longword;
     CountTicks: Longword;
-    prevPoint, prevTargetPoint: TPoint;
+    prevPoint{, prevTargetPoint}: TPoint;
     amSel: TAmmoType = amNothing;
     missionTex: PTexture;
     missionTimer: LongInt;
@@ -221,8 +221,8 @@
 uCursor.init();
 prevPoint.X:= 0;
 prevPoint.Y:= cScreenHeight div 2;
-prevTargetPoint.X:= 0;
-prevTargetPoint.Y:= 0;
+//prevTargetPoint.X:= 0;
+//prevTargetPoint.Y:= 0;
 WorldDx:=  -(LAND_WIDTH div 2) + cScreenWidth div 2;
 WorldDy:=  -(LAND_HEIGHT - (playHeight div 2)) + (cScreenHeight div 2);
 
@@ -642,7 +642,7 @@
             AMShiftX:= AMShiftTargetX;
             AMShiftY:= AMShiftTargetY;
             prevPoint:= CursorPoint;
-            prevTargetPoint:= TargetCursorPoint;
+            //prevTargetPoint:= TargetCursorPoint;
             AMState:= AMHidden;
             end;
     end;