[freeciv-ai] Re: [Freeciv-Dev] (PR#13227) foreign guard
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13227 >
On Sat, 11 Jun 2005, Per I. Mathisen wrote:
> Attached patch (untested) should fix this.
*ahem* This patch.
- Per
Index: ai/aiguard.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aiguard.c,v
retrieving revision 1.1
diff -u -r1.1 aiguard.c
--- ai/aiguard.c 7 May 2005 13:35:25 -0000 1.1
+++ ai/aiguard.c 11 Jun 2005 18:22:24 -0000
@@ -276,12 +276,8 @@
guard->ai.charge = BODYGUARD_NONE;
BODYGUARD_LOG(LOGLEVEL_BODYGUARD, guard, "charge was destroyed");
}
- if (charge_owner && pplayers_at_war(charge_owner, guard_owner)) {
- BODYGUARD_LOG(LOGLEVEL_BODYGUARD, guard, "charge became an enemy");
- aiguard_clear_charge(guard);
- } else if (charge_owner && charge_owner != guard_owner
- && !pplayers_allied(charge_owner, guard_owner)) {
- BODYGUARD_LOG(LOGLEVEL_BODYGUARD, guard, "charge is not allied");
+ if (charge_owner && charge_owner != guard_owner) {
+ BODYGUARD_LOG(LOGLEVEL_BODYGUARD, guard, "charge transferred, dismiss");
aiguard_clear_charge(guard);
}
|
|