Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] [PATCH] new moving type: unknown (PR#1316)
Home

[Freeciv-Dev] [PATCH] new moving type: unknown (PR#1316)

[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] [PATCH] new moving type: unknown (PR#1316)
From: Markus Linnala <maage@xxxxxxxxx>
Date: Sun, 10 Mar 2002 08:33:24 -0800 (PST)

New moving type type unknown. Use it instead of 0.

diff -ur -X freeciv/diff_ignore freeciv/ai/aicity.c 
freeciv-unknown-moving/ai/aicity.c
--- freeciv/ai/aicity.c Fri Mar  8 19:06:18 2002
+++ freeciv-unknown-moving/ai/aicity.c  Sun Mar 10 18:31:12 2002
@@ -466,7 +466,7 @@
               really_handle_city_buy(pplayer, pcity);
 /* don't need to waste gold here, but may as well spend our production */
             else pcity->currently_building = ai_choose_defender_limited(pcity,
-                  pcity->shield_stock + pcity->shield_surplus, 0);
+                  pcity->shield_stock + pcity->shield_surplus, UNKNOWN_MOVING);
           } else if (buycost > pplayer->ai.maxbuycost) pplayer->ai.maxbuycost 
= buycost;
 /* possibly upgrade units here */
         } /* end panic subroutine */
@@ -713,7 +713,7 @@
 
 Unit_Type_id ai_choose_defender(struct city *pcity)
 {
-  return (ai_choose_defender_limited(pcity, pcity->shield_stock + 40, 0));
+  return (ai_choose_defender_limited(pcity, pcity->shield_stock + 40, 
UNKNOWN_MOVING));
 }
 
 #ifdef UNUSED
diff -ur -X freeciv/diff_ignore freeciv/common/unittype.c 
freeciv-unknown-moving/common/unittype.c
--- freeciv/common/unittype.c   Wed Mar  6 12:05:16 2002
+++ freeciv-unknown-moving/common/unittype.c    Sun Mar 10 18:31:12 2002
@@ -351,7 +351,7 @@
       return i;
     }
   }
-  return 0;
+  return UNKNOWN_MOVING;
 }
 
 /**************************************************************************
diff -ur -X freeciv/diff_ignore freeciv/common/unittype.h 
freeciv-unknown-moving/common/unittype.h
--- freeciv/common/unittype.h   Wed Mar  6 12:05:16 2002
+++ freeciv-unknown-moving/common/unittype.h    Sun Mar 10 18:31:12 2002
@@ -52,7 +52,7 @@
 */
 
 enum unit_move_type {
-  LAND_MOVING = 1, SEA_MOVING, HELI_MOVING, AIR_MOVING
+  UNKNOWN_MOVING = 0, LAND_MOVING = 1, SEA_MOVING, HELI_MOVING, AIR_MOVING
 };
 
 /* Classes for unit types.

-- 
//Markus



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