Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Map loading error with old saved games (PR#1214)
Home

[Freeciv-Dev] Re: Map loading error with old saved games (PR#1214)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Map loading error with old saved games (PR#1214)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Jan 2002 10:39:21 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Jan 09, 2002 at 09:50:23PM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> Vasco Alexandre Da Silva Costa wrote:
> 
> It looks like the old savegame stores C_TILE_EMPTY as the worker status 
> for invalid (unreal) city positions.  This causes a failed assertion 
> when set_worker_city is called, since that function expects 
> C_TILE_UNAVAILABLE in such cases.

Ack.

> Applying this patch (as well as the previous one) and compiling without 
> debugging should allow things to work.
> 
> Getting things to work with debugging is a bit trickier, and probably 
> not worthwhile.  You could just remove the assertion, but that's a bad 
> idea IMO (though it could be replaced with a freelog(...) error 
> message).  

> The other alternative is to have the loading code check for the
> unreal+C_TILE_EMPTY case, and convert it to C_TILE_UNAVAILABLE -
> this would be a pain to do.

Why painful?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."

Attachment: unreal_city_savegame_fix1.diff
Description: Text document


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