Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12664) Client-side goto does not work with unlimited f
Home

[Freeciv-Dev] (PR#12664) Client-side goto does not work with unlimited f

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12664) Client-side goto does not work with unlimited fuel
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Mar 2005 09:21:06 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12664 >

> [per - Sat Mar 26 15:26:55 2005]:
> 
> Aircraft with unlimited fuel (fuel==0) will not work with the client side
> goto.

This is true for all PF it seems.  This patch fixes it.  Also attached
is the data patch I used for testing.

-jason

Index: common/aicore/pf_tools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/pf_tools.c,v
retrieving revision 1.27
diff -u -r1.27 pf_tools.c
--- common/aicore/pf_tools.c    21 Mar 2005 13:38:11 -0000      1.27
+++ common/aicore/pf_tools.c    29 Mar 2005 17:20:05 -0000
@@ -471,7 +471,11 @@
     break;
   case AIR_MOVING:
     parameter->get_MC = single_airmove;
-    parameter->is_pos_dangerous = air_is_pos_dangerous;
+    if (unit_type(punit)->fuel > 0) {
+      parameter->is_pos_dangerous = air_is_pos_dangerous;
+    } else {
+      parameter->is_pos_dangerous = NULL;
+    }
     parameter->turn_mode = TM_WORST_TIME;
     break;
   case HELI_MOVING:
Index: data/default/units.ruleset
===================================================================
RCS file: /home/freeciv/CVS/freeciv/data/default/units.ruleset,v
retrieving revision 1.66
diff -u -r1.66 units.ruleset
--- data/default/units.ruleset  13 Mar 2005 17:59:40 -0000      1.66
+++ data/default/units.ruleset  29 Mar 2005 17:20:00 -0000
@@ -964,7 +964,7 @@
 [unit_fighter]
 name          = _("Fighter")
 move_type     = "Air"
-tech_req      = "Flight"
+tech_req      = "None"
 obsolete_by   = "Stealth Fighter"
 graphic       = "u.fighter"
 graphic_alt   = "-"
@@ -972,7 +972,7 @@
 sound_move_alt = "m_generic"
 sound_fight   = "f_fighter"
 sound_fight_alt = "f_generic"
-build_cost    = 60
+build_cost    = 10
 pop_cost      = 0
 attack        = 4
 defense       = 3
@@ -981,7 +981,7 @@
 move_rate     = 10
 vision_range  = 2
 transport_cap = 0
-fuel          = 1
+fuel          = 0
 uk_happy      = 0
 uk_shield     = 1
 uk_food       = 0

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