[Freeciv-Dev] (PR#10652) Assertion `unit_list_size(&ptile->units) == 0'
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10652 >
> [jdorje - Wed Oct 20 22:04:39 2004]:
>
> Jason Short wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=10652 >
> >
> > Jason Short wrote:
> >
> >><URL: http://rt.freeciv.org/Ticket/Display.html?id=10652 >
> >>
> >>1: 0x84b3840 Warriors at (23,19) Cyrus
> >>civclient: packhand.c:1939: handle_tile_info: Assertion
> >>`unit_list_size(&ptile->units) == 0' failed.
> >>
> >>I got this when my ally, whose warriors were inside my trireme, in the
> >>middle of the ocean, declared war on me.
> >
> > Load this game, connect as jdorje2, hit turn done a time or two.
>
> Oops. Under that game you have to patch the units.ruleset to remove the
> Trireme flag from trireme. Otherwise the trireme just sinks.
>
> This savegame should do it though. I just changed the triremes to
> caravels...
>
> jason
>
With the attached patch there's no crash anymore.
--
mateusz
--- freeciv2/server/plrhand.c 2004-10-24 10:12:55.000000000 +0200
+++ freeciv/server/plrhand.c 2004-10-24 21:52:51.018413800 +0200
@@ -1154,6 +1154,8 @@
/* If the old state was alliance, the players' units can share tiles
illegally, and we need to call resolve_unit_stacks() */
if (old_type == DS_ALLIANCE) {
+ remove_allied_visibility(pplayer, pplayer2);
+ remove_allied_visibility(pplayer2, pplayer);
resolve_unit_stacks(pplayer, pplayer2, TRUE);
}
|
|