Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] (PR#18515) [Patch] ai_unit_defence_desirability() & F_BADC
Home

[Freeciv-Dev] (PR#18515) [Patch] ai_unit_defence_desirability() & F_BADC

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#18515) [Patch] ai_unit_defence_desirability() & F_BADCITYDEFENDER
From: "Marko Lindqvist" <cazfi74@xxxxxxxxx>
Date: Tue, 11 Jul 2006 11:54:37 -0700
Reply-to: bugs@xxxxxxxxxxx

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


  Check flag F_BADCITYDEFENDER instead of
move_type == SEA_MOVING.

  I intend to commit this also to S2_1.


  - ML

diff -Nurd -X.diff_ignore freeciv/ai/advmilitary.c freeciv/ai/advmilitary.c
--- freeciv/ai/advmilitary.c    2006-07-11 19:04:50.500000000 +0300
+++ freeciv/ai/advmilitary.c    2006-07-11 21:46:57.203125000 +0300
@@ -600,7 +600,7 @@
 
   /* Sea and helicopters often have their firepower set to 1 when
    * defending. We can't have such units as defenders. */
-  if (get_unit_move_type(punittype) != SEA_MOVING
+  if (!unit_type_flag(punittype, F_BADCITYDEFENDER)
       && get_unit_move_type(punittype) != HELI_MOVING) {
     /* Sea units get 1 firepower in Pearl Harbour,
      * and helicopters very bad against air units */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#18515) [Patch] ai_unit_defence_desirability() & F_BADCITYDEFENDER, Marko Lindqvist <=