Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Introducing a new define for IgTer units (PR#1359)
Home

[Freeciv-Dev] Introducing a new define for IgTer units (PR#1359)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Introducing a new define for IgTer units (PR#1359)
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Tue, 2 Apr 2002 19:52:37 -0800 (PST)

Just read the patch. New #define, introducing IGTER_MOVE_BONUS. Replacing a few
misplaced 3's and SINGLE_MOVE's with the correct constant.

Author: Raahul Kumar
CVS Version: Mar 28
Tested: Compiles successfully
Apply patch with: patch < igter.diff -p0, autoheader;aclocal;autoconf;automake
./configure -[with usual options], make, make install
Savegames: No differences found. If you can produce a changed savegame, send me
the files.

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
diff -ruN -Xdiff_ignore cvs-freeciv/ai/advmilitary.c freeciv/ai/advmilitary.c
--- cvs-freeciv/ai/advmilitary.c        Tue Apr  2 16:42:14 2002
+++ freeciv/ai/advmilitary.c    Wed Apr  3 13:26:47 2002
@@ -594,8 +594,9 @@
       /* b is unchanged */
 
       m = unit_types[i].move_rate;
-      q = (acity ? 1 : unit_types[n].move_rate * (unit_type_flag(n, F_IGTER) ? 
3 : 1));
-      if (unit_type_flag(i, F_IGTER)) m *= SINGLE_MOVE; /* not quite right */
+      q = (acity ? 1 : unit_types[n].move_rate * (unit_type_flag(n, F_IGTER) ? 
+          IGTER_MOVE_BONUS : 1));
+      if (unit_type_flag(i, F_IGTER)) m *= IGTER_MOVE_BONUS; /* not quite 
right */
       if (unit_types[i].move_type == LAND_MOVING) {
         if (boatspeed != 0) { /* has to be a city, so don't bother with q */
           c = (warmap.cost[bx][by] + m - 1) / m + 1 +
@@ -728,7 +729,7 @@
       pdef = get_defender(myunit, x, y);
 
       m = unit_types[v].move_rate;
-      if (unit_type_flag(v, F_IGTER)) m *= 3; /* not quite right */
+      if (unit_type_flag(v, F_IGTER)) m *= IGTER_MOVE_BONUS; /* not quite 
right */
 
       sanity = (goto_is_sane(myunit, acity->x, acity->y, TRUE) &&
               warmap.cost[x][y] <= (MIN(6, m) * THRESHOLD));
@@ -797,7 +798,7 @@
       if (dist == 0) dist = 1;
 
       m = unit_types[v].move_rate;
-      if (unit_type_flag(v, F_IGTER)) m *= 3; /* not quite right */
+      if (unit_type_flag(v, F_IGTER)) m *= IGTER_MOVE_BONUS; /* not quite 
right */
       c = ((dist + m - 1) / m);
 
       n = pdef->type;
diff -ruN -Xdiff_ignore cvs-freeciv/common/unit.h freeciv/common/unit.h
--- cvs-freeciv/common/unit.h   Tue Apr  2 16:42:17 2002
+++ freeciv/common/unit.h       Wed Apr  3 13:19:15 2002
@@ -149,6 +149,7 @@
 #define MOVE_COST_RAIL 0
 #define MOVE_COST_ROAD 1
 #define MOVE_COST_AIR 1
+#define IGTER_MOVE_BONUS 3
 
 #define unit_list_iterate_safe(unitlist, punit) \
 { \

[Prev in Thread] Current Thread [Next in Thread]