Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2005:
[Freeciv-Dev] (PR#13916) loaded units shouldn't be allowed to fortify
Home

[Freeciv-Dev] (PR#13916) loaded units shouldn't be allowed to fortify

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13916) loaded units shouldn't be allowed to fortify
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 3 Oct 2005 11:24:37 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [jdorje - Wed Sep 07 21:22:47 2005]:
> 
> Units loaded in transporters either shouldn't be allowed to fortify (in 
> can_unit_do_activity) or the act of fortifying should unload them.

Here's a patch for 2.0.  For 2.1 I'd like to make some more exciting
changes here...

-jason

? data/amplio
? data/amplio.tilespec
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.219.2.7
diff -p -u -r1.219.2.7 unit.c
--- common/unit.c       24 Sep 2005 01:28:05 -0000      1.219.2.7
+++ common/unit.c       3 Oct 2005 18:23:43 -0000
@@ -908,6 +908,7 @@ bool can_unit_do_activity_targeted_at(st
 
   case ACTIVITY_FORTIFYING:
     return (is_ground_unit(punit)
+           && punit->transported_by == -1
            && punit->activity != ACTIVITY_FORTIFIED
            && !unit_flag(punit, F_SETTLERS)
            && !is_ocean(ptile->terrain));

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