[Freeciv-Dev] shore landing takes all movement (PR#7281)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] shore landing takes all movement (PR#7281) |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Fri, 2 Apr 2004 03:34:54 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7281 >
This patch implements shore landings by ground units that take all their
remaining movement. The patch looks simple, but should be carefully
considered by Raimar or Greg for its implications for path-finding.
- Per
Index: common/map.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/map.c,v
retrieving revision 1.163
diff -u -r1.163 map.c
--- common/map.c 26 Feb 2004 13:19:47 -0000 1.163
+++ common/map.c 2 Apr 2004 11:33:28 -0000
@@ -889,6 +889,12 @@
{
bool cardinal_move;
+ if (punit
+ && is_ground_unit(punit)
+ && is_ocean(t1->terrain)
+ && !is_ocean(t2->terrain)) {
+ return punit->moves_left;
+ }
if (punit && !is_ground_unit(punit))
return SINGLE_MOVE;
if (tile_has_special(t1, S_RAILROAD) && tile_has_special(t2, S_RAILROAD))
- [Freeciv-Dev] shore landing takes all movement (PR#7281),
Per I. Mathisen <=
|
|