Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1999:
[Freeciv-Dev] Re: Help->ZOC in 1.8.3beta (PR#142)
Home

[Freeciv-Dev] Re: Help->ZOC in 1.8.3beta (PR#142)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Help->ZOC in 1.8.3beta (PR#142)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 5 Oct 1999 00:24:56 +1000 (EST)

#&%-listar...

(Original also CC-ed to bugs@xxxxxxxxxxxxxxxxxxx)

Reinier Post wrote:

> Selecting any [listar-munge]help item will cause the crash.
> The problem is an attempt to create tiles with unit pictures;
> the units aren't known yet.
> 
> A fix against the Oct 2 snapshot is attached.  It appears to be
> a clean solution, but someone with more than 10 secs experience
> with the GTK code may wish to look it over.

Ah thanks, now I can reproduce it; the real problem comes from:

  if(!use_solid_color_behind_units)  {
    struct Sprite *flag=get_nation_by_plr(game.player_ptr)->flag_sprite;

and unfortunately I happened to have use_solid_colors set in my 
.civclient due to some other unrelated testing.  

I had considered the unit pics, but dismissed that as not a problem, 
because the help system doesn't _contain_ help on specific units 
until _after_ the game starts.  But it seems the gtk client wants 
to setup a dummy unit overlay when creating any help dialog, hence
the blow-up.

> Incidentally, it would be better if the rulesets were read
> at the time they are specified (on startup and whenever the
> server variables change).  That way, any errors can be caught
> before the game is started.

Thats also problematic though, because the rulesets may not be
consistent if you change just one ruleset (eg, as part of changing
a set of rulesets).  And changing some rulesets can impact other 
rulesets (eg, changing tech dependencies). So you can't just do
it whenever a single server ruleset option changes.

I think the current method is workable: initally one effectively
has empty rulesets (game.num_unit_types==0 etc), and its just that 
some code does not yet handle this boundary condition (empty rulesets) 
well, and needs to be fixed.

-- David


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