Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2001:
[Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)
Home

[Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: Alan Schmitt <alan.schmitt@xxxxxxxx>, Reinier Post <rp@xxxxxxxxxx>, Steve.Kay@xxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Re: All cities have trade of 0 (PR#1070)
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Mon, 26 Nov 2001 16:03:44 +0100

> > > +void move_palace(struct player *pplayer, struct city *pfrom)
> > > +{
> > > +  int size;
> > > +  struct city *pnewcity;
> > > +
> > > +  size = city_list_size(&pplayer->cities);
> >
> > > +  if (size <= 1)
> > > +    return; /* we can't choose from anything */
> > 
> > Can this function called after the player looses its city? Then we can
> > assert that we have at least one city which have to get the palace.
> Yes, we can.
Hmm, looks like you wait for the patch with assertion included :-).
Here it goes.

-- 

                                Petr "Pasky" Baudis

UN*X programmer, UN*X administrator, hobbies = IPv6, IRC
Real Users hate Real Programmers.
Public PGP key, geekcode and stuff: http://pasky.ji.cz/~pasky/

Attachment: savepalace.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]