[Freeciv-Dev] Re: (PR#4660) Weird alliance code bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 24 Jul 2003, Tom Goulet wrote:
> > > My cruiser attempted to attack an Chilean alpine troops that seemed to
> > > be on an Arabian transport on the ocean. Freeciv reported back to me
> > > "No war declared against Foobar, cannot attack". Foobar is the
> > > Chileans.
...
> Nope, I was at war with both of them.
Most peculiar. Do you have a savegame?
Can you try this patch when you attack and tell me what you get?
- Per
"This is the future for the world we're in at the moment,"
promised Lawrence Di Rita, special assistant to Rumsfeld.
"We'll get better as we do it more often."
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.265
diff -u -r1.265 unithand.c
--- server/unithand.c 20 Jul 2003 20:41:39 -0000 1.265
+++ server/unithand.c 24 Jul 2003 10:17:02 -0000
@@ -997,6 +997,18 @@
}
}
+if (pdefender)
+freelog(LOG_NORMAL, "pdefender is %s's %s (id %d)",
unit_owner(pdefender)->name,
+ unit_type(pdefender)->name, pdefender->id);
+freelog(LOG_NORMAL, "attacker is %s's %s (id %d)", unit_owner(punit)->name,
+ unit_type(punit)->name, punit->id);
+unit_list_iterate(pdesttile->units, aunit) {
+ freelog(LOG_NORMAL, "Found %s owned by %s (id %d) who is %s",
+ unit_type(aunit)->name, unit_owner(aunit)->name, aunit->id,
+ pplayers_at_war(unit_owner(punit), unit_owner(aunit)) ?
+ "at war with us" : "at peace with us");
+} unit_list_iterate_end;
+
/*** Try to attack if there is an enemy unit on the target tile ***/
if (pdefender
&& pplayers_at_war(unit_owner(punit), unit_owner(pdefender))) {
- [Freeciv-Dev] Re: (PR#4660) Weird alliance code bug,
Per I. Mathisen <=
- Message not available
|
|