[Freeciv-Dev] Re: (PR#4819) Client goto: Igter units think they are mari
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#4819) Client goto: Igter units think they are marines. |
From: |
"Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxx> |
Date: |
Mon, 11 Aug 2003 11:11:23 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
Not only Jason forgets to append patches...
On Mon, 11 Aug 2003, Gregory Berkolaiko wrote:
> I missed one case in a related bugix. A patch is attached. Will be
> committed soon.
>
> G.
Index: common/aicore/pf_tools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/pf_tools.c,v
retrieving revision 1.5
diff -u -r1.5 pf_tools.c
--- common/aicore/pf_tools.c 2003/07/21 19:01:01 1.5
+++ common/aicore/pf_tools.c 2003/08/11 18:02:51
@@ -147,7 +147,7 @@
/************************************************************
Reversed LAND_MOVE cost function for a unit.
- Will be used. DO NOT REMOVE you pricks.
+ Will be used. DO NOT REMOVE.
************************************************************/
#ifdef UNUSED
static int reverse_move_unit(int x, int y, enum direction8 dir,
@@ -193,7 +193,15 @@
move_cost = PF_IMPOSSIBLE_MC;
}
} else if (ptile->terrain == T_OCEAN) {
- move_cost = MOVE_COST_ROAD;
+ struct tile *ptile1 = map_get_tile(x1, y1);
+
+ if (!BV_ISSET(param->unit_flags, F_MARINES)
+ && (is_non_allied_unit_tile(ptile1, param->owner)
+ || is_non_allied_city_tile(ptile1, param->owner))) {
+ move_cost = PF_IMPOSSIBLE_MC;
+ } else {
+ move_cost = MOVE_COST_ROAD;
+ }
} else {
move_cost = (ptile->move_cost[dir] != 0 ? MOVE_COST_ROAD : 0);
}
@@ -202,7 +210,7 @@
/************************************************************
Reversed IGTER_MOVE cost function for a unit.
- Will be used. DO NOT REMOVE you pricks.
+ Will be used. DO NOT REMOVE.
************************************************************/
#ifdef UNUSED
static int reverse_igter_move_unit(int x, int y, enum direction8 dir,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Re: (PR#4819) Client goto: Igter units think they are marines.,
Gregory Berkolaiko <=
|
|