Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2000:
[Freeciv-Dev] Re: Partisans invisible to controlling player... (PR#253)
Home

[Freeciv-Dev] Re: Partisans invisible to controlling player... (PR#253)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jmb65@xxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Partisans invisible to controlling player... (PR#253)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 5 Feb 2000 00:58:17 +1100 (EST)

Jez Bromley <jmb65@xxxxxxxxx> wrote:

>       Using the CVS version of Jan 24th I found the following server bug
> which a quick scan of the Changelogs suggests you haven't yet spotted or 
> fixed:
> 
>       When a player has a city large enough to suuport partisans (and of
> course relevant tech) but has not yet explored all the squares lying within
> the city's boundaries, then upon the city being captured by another player
> it can happen that a partisan is created on one of the squares which the
> original
> owner cannot see (ie hasn't yet explored). If this happens rather than making
> the square visible to the player, the server continues to flag the square as
> unseen.  This means the player is unable to move the partisan --- and is in
> fact unaware of its existance until (possibly many turns later) he/she 
> explores
> that square.

Thanks for the bug report.  (Though this does seem like a
pretty rare case, so I can see why it hadn't been noticed 
before! :-)

I can't be bothered trying to setup a case to test this, but
the attached minmal patch should fix the problem.  (I restrained
myself from doing any reformating or optimisation of the 
surrounding code...)

-- David
--- freeciv-cvs/server/unitfunc.c       Thu Feb  3 13:00:26 2000
+++ fc-adv/server/unitfunc.c    Sat Feb  5 00:48:30 2000
@@ -2199,6 +2199,7 @@
   while(count && total)  {
     for(i=0,x=myrand(total)+1;x;i++) if(ok[i]) x--;
     ok[--i]=0; x=(i/5)-2+pcity->x; y=(i%5)-2+pcity->y;
+    light_square(city_owner(pcity), map_adjust_x(x), map_adjust_y(y), 0);
     create_unit(&game.players[pcity->owner], map_adjust_x(x), map_adjust_y(y),
                get_role_unit(L_PARTISAN,0), 0, 0, -1);
     count--; total--;

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