Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6789) Re: Assertion triggers in 1.14-beta2!
Home

[Freeciv-Dev] (PR#6789) Re: Assertion triggers in 1.14-beta2!

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6789) Re: Assertion triggers in 1.14-beta2!
From: "mateusz stefek" <matusik_s@xxxxx>
Date: Fri, 7 Nov 2003 00:19:51 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6789 >

> create a1
> create a2
> create b1
> create b2
> team a1 A
> team a2 A
> team b1 B
> set techlevel 50
> set seed 1088
> set randseed 1088
> set timeout -1
> start
> 
> kaboom!!
> 
> Game saved as civgame+0078.sav.gz
> >
> Player 'Cuahtemoc' now has AI skill level 'easy'.
> > civserver-1.14: sanitycheck.c:118: check_map: Assertion  
> > `pplayers_allied(unit_owner(punit), unit_owner(punit2))' failed.
> 
[...]
> Something went wrong when Cuahtemoc was created.
> --
> mateusz
> 
Cuahtemoc was created when a2 lost his capital.
Unfortunately Cuahtemoc received an unit which was stacked with a1's units.

Fix attached

--
mateusz

--- freeorig/server/plrhand.c   2003-03-17 17:20:55.000000000 +0100
+++ freeciv-1.14/server/plrhand.c       2003-11-07 08:44:42.000000000 +0100
@@ -1785,7 +1785,10 @@
   city_list_iterate(cplayer->cities, pcity) {
     resolve_unit_stack(pcity->x, pcity->y, FALSE);
   } city_list_iterate_end;
-
+  /* solve problems with pplayers allies */
+  unit_list_iterate(cplayer->units, punit) 
+    resolve_unit_stack(punit->x, punit->y, FALSE);
+  unit_list_iterate_end;
 
   notify_player(NULL,
                _("Game: The capture of %s's capital and the destruction "

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6789) Re: Assertion triggers in 1.14-beta2!, mateusz stefek <=