- Some physics changes
authorunc0rr
Wed, 30 Jul 2008 12:14:24 +0000
changeset 1141 44d4d6aaecb5
parent 1140 a32f1eed51a6
child 1142 2c522c1ded31
- Some physics changes - Set version to 0.9.7-dev
CMakeLists.txt
hedgewars.kdevelop
hedgewars/uAIMisc.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/CMakeLists.txt	Tue Jul 29 22:59:19 2008 +0000
+++ b/CMakeLists.txt	Wed Jul 30 12:14:24 2008 +0000
@@ -9,7 +9,7 @@
 
 set(CPACK_PACKAGE_VERSION_MAJOR "0")
 set(CPACK_PACKAGE_VERSION_MINOR "9")
-set(CPACK_PACKAGE_VERSION_PATCH "6-dev")
+set(CPACK_PACKAGE_VERSION_PATCH "7-dev")
 
 if(DEFINED DATA_INSTALL_DIR)
 	set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
@@ -19,7 +19,7 @@
 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
 
 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-set(HEDGEWARS_PROTO_VER 15)
+set(HEDGEWARS_PROTO_VER 17)
 
 add_subdirectory(bin)
 add_subdirectory(QTfrontend)
--- a/hedgewars.kdevelop	Tue Jul 29 22:59:19 2008 +0000
+++ b/hedgewars.kdevelop	Wed Jul 30 12:14:24 2008 +0000
@@ -27,13 +27,13 @@
     <run>
       <directoryradio>executable</directoryradio>
       <customdirectory>/</customdirectory>
-      <mainprogram></mainprogram>
+      <mainprogram>bin/hedgewars</mainprogram>
       <programargs></programargs>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
       <envvars/>
       <globaldebugarguments></globaldebugarguments>
-      <globalcwd></globalcwd>
+      <globalcwd>/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-FF/trunk</globalcwd>
       <useglobalprogram>false</useglobalprogram>
       <autoinstall>false</autoinstall>
       <autokdesu>false</autokdesu>
--- a/hedgewars/uAIMisc.pas	Tue Jul 29 22:59:19 2008 +0000
+++ b/hedgewars/uAIMisc.pas	Wed Jul 30 12:14:24 2008 +0000
@@ -193,10 +193,10 @@
 for i:= 0 to Targets.Count do
     with Targets.ar[i] do
          begin
-         dmg:= r - hwRound(DistanceI(Point.x - x, Point.y - y));
+         dmg:= r + cHHRadius div 2 - hwRound(DistanceI(Point.x - x, Point.y - y));
          if dmg > 0 then
             begin
-            dmg:= dmg shr 1;
+            dmg:= min(dmg div 2, r);
             if dmg >= abs(Score) then
                if Score > 0 then inc(Result, KillScore)
                             else dec(Result, KillScore * friendlyfactor div 100)
--- a/hedgewars/uConsts.pas	Tue Jul 29 22:59:19 2008 +0000
+++ b/hedgewars/uConsts.pas	Wed Jul 30 12:14:24 2008 +0000
@@ -147,7 +147,7 @@
 	cMaxEdgePoints = 16384;
 
 	cHHRadius = 9;
-	cHHStepTicks = 38;
+	cHHStepTicks = 29;
 
 	cHHZ = 1000;
 	cCurrHHZ = Succ(cHHZ);
--- a/hedgewars/uGears.pas	Tue Jul 29 22:59:19 2008 +0000
+++ b/hedgewars/uGears.pas	Wed Jul 30 12:14:24 2008 +0000
@@ -1079,11 +1079,11 @@
 Gear:= GearsList;
 while Gear <> nil do
       begin
-      dmg:= dmgRadius - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));
+      dmg:= dmgRadius  + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));
       if (dmg > 1) and
          ((Gear^.State and gstNoDamage) = 0) then
          begin
-         dmg:= dmg div 2;
+         dmg:= min(dmg div 2, Radius);
          case Gear^.Kind of
               gtHedgehog,
                   gtMine,