<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40184 >

> [book - Wed Jun 11 20:43:45 2008]:
> 
> > [EMAIL PROTECTED] - Wed Jun 11 19:15:25 2008]:
> >
> >  - packhand.c:2368: handle_tile_info: Assertion
> > `unit_list_size(ptile->units) == 0' failed. I were removing vision
> > from tile with somebody else's unit.
> 
> This looks like a bug due to a condition I failed to forsee.
> It should be easy enough to fix (i.e. don't allow removing
> vision of a player on a tile with that players' units/city
> in it). I'll get right on fixing it.

This actually turned out to be caused by something
different than what I expected. It seems the client
expects tiles changing seen state from "known seen"
to have no units on it:

client/packhand.c +2357
>  if (TILE_KNOWN_SEEN == old_known && TILE_KNOWN_SEEN != new_known) {
>    /* This is an error.  So first we log the error, then make
>       assertion. But for NDEBUG clients we fix the error. */ 
>    unit_list_iterate(ptile->units, punit) {       
>      freelog(LOG_ERROR, "%p %d %s at (%d,%d) %s", 
>              punit,                               
>              punit->id,                           
>              unit_rule_name(punit),               
>              TILE_XY(punit->tile),                
>              player_name(unit_owner(punit)));     
>    } unit_list_iterate_end;                       
>    assert(unit_list_size(ptile->units) == 0);     
>    unit_list_unlink_all(ptile->units);            
>  }

So my idea is to send a packet_unit_remove to the
client for every unit on the tile if none of the units
give vision to the client's player (i.e. neither owned
by the client's player nor by any player that "really
shares vision" with the player). Is there anything
wrong with this approach?

Or would it be better to just have the client remove
the units itself in the above quoted section?


----------------------------------------------------------------------
早く返事して下さいね

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to