also merge 0.9.16 in to make koda happy
authorsheepluva
Mon, 19 Sep 2011 23:49:20 +0200
changeset 5966 a0f38ad66163
parent 5965 e529b28d10e9 (diff)
parent 5963 c24fdd9a0458 (current diff)
child 5967 500e7a1cf9a3
also merge 0.9.16 in to make koda happy
--- a/CMakeLists.txt	Mon Sep 19 19:12:19 2011 +0200
+++ b/CMakeLists.txt	Mon Sep 19 23:49:20 2011 +0200
@@ -12,7 +12,7 @@
 
 
 #detect Mercurial revision (if present)
-set(version_suffix "") #UNSET THIS VARIABLE AT RELEASE TIME
+set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
 set(HGCHANGED "")
 IF(version_suffix MATCHES "-dev")
 	set(HW_DEV true)
@@ -41,8 +41,8 @@
 #versioning
 set(CPACK_PACKAGE_VERSION_MAJOR 0)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 16${version_suffix})
-set(HEDGEWARS_PROTO_VER 39)
+set(CPACK_PACKAGE_VERSION_PATCH 17${version_suffix})
+set(HEDGEWARS_PROTO_VER 40)
 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 
 
--- a/hedgewars/HHHandlers.inc	Mon Sep 19 19:12:19 2011 +0200
+++ b/hedgewars/HHHandlers.inc	Mon Sep 19 23:49:20 2011 +0200
@@ -1077,13 +1077,13 @@
 if ((Gear^.State and gstWait) = 0) and
     (prevState <> Gear^.State) then
     begin
-    Gear^.State:= gstWait;
+    Gear^.State:= Gear^.State or gstWait;
     Gear^.Timer:= 150
     end else
     begin
     if Gear^.Timer = 0 then
         begin
-        Gear^.State:= 0;
+        Gear^.State:= Gear^.State and not gstWait;
         Gear^.Active:= false;
         AddGearCI(Gear);
         exit
@@ -1107,7 +1107,9 @@
 else
     begin
     with Gear^.Hedgehog^ do
-        if Team^.hasGone then TeamGoneEffect(Team^);
-    doStepHedgehogDriven(Gear)
+        if Team^.hasGone then
+            TeamGoneEffect(Team^)
+        else
+            doStepHedgehogDriven(Gear)
     end;
 end;
--- a/hedgewars/uScript.pas	Mon Sep 19 19:12:19 2011 +0200
+++ b/hedgewars/uScript.pas	Mon Sep 19 23:49:20 2011 +0200
@@ -1207,6 +1207,11 @@
             lua_pushinteger(L, hwRound(gear^.X));
             lua_pushinteger(L, hwRound(gear^.Y))
             end
+        else
+            begin
+            lua_pushnil(L);
+            lua_pushnil(L)
+            end;
         end;
     lc_getgearposition:= 2;
 end;
--- a/hedgewars/uTeams.pas	Mon Sep 19 19:12:19 2011 +0200
+++ b/hedgewars/uTeams.pas	Mon Sep 19 23:49:20 2011 +0200
@@ -430,7 +430,8 @@
             if Gear <> nil then
                 begin
                 Gear^.Invulnerable:= false;
-                Gear^.Damage:= Gear^.Health
+                Gear^.Damage:= Gear^.Health;
+                Gear^.State:= (Gear^.State or gstHHGone) and not gstHHDriven
                 end
 end;