[Freeciv-Dev] Re: Linux saved game crashes client on Solaris (PR#1522)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, May 31, 2002 at 03:30:08AM -0700, Per I Mathisen wrote:
> On Thu, 30 May 2002, Raimar Falke wrote:
> > > > This causes another failure by me: it uses T_RIVER but the sprites of
> > > > the river terrain type are all NULL.
> > >
> > > Can be reproduced with data/scenario/earth-160x90-v1.sav and a non-iso
> > > tileset.
> >
> > Reason:
> >
> > $ grep terrain data/scenario/earth-160x90-v1.sav
> > ruleset.terrain="classic"
> >
> > Per?
>
> Does the problem go away if you try to edit the savegame and change
> "classic" to "default"? It should.
Have you looked at the code? This can't work since you have removed
the ability to specify the different ruleset dirs:
- sz_strlcpy(game.ruleset.techs,
- secfile_lookup_str_default(file, "default",
"game.ruleset.techs"));
- sz_strlcpy(game.ruleset.units,
- secfile_lookup_str_default(file, "default",
"game.ruleset.units"));
- sz_strlcpy(game.ruleset.buildings,
- secfile_lookup_str_default(file, "default",
- "game.ruleset.buildings"));
- sz_strlcpy(game.ruleset.terrain,
- secfile_lookup_str_default(file, "classic",
- "game.ruleset.terrain"));
- sz_strlcpy(game.ruleset.governments,
- secfile_lookup_str_default(file, "default",
- "game.ruleset.governments"));
- sz_strlcpy(game.ruleset.nations,
- secfile_lookup_str_default(file, "default",
- "game.ruleset.nations"));
- sz_strlcpy(game.ruleset.cities,
- secfile_lookup_str_default(file, "default",
"game.ruleset.cities"));
if(game.civstyle == 1) {
string = "civ1";
} else {
string = "default";
game.civstyle = GAME_DEFAULT_CIVSTYLE;
}
- sz_strlcpy(game.ruleset.game,
+
+ if (!has_capability("rulesetdir", savefile_options)) {
+ /* touch to prevent warnings */
+ section_file_lookup(file, "game.ruleset.techs");
+ section_file_lookup(file, "game.ruleset.units");
+ section_file_lookup(file, "game.ruleset.buildings");
+ section_file_lookup(file, "game.ruleset.terrain");
+ section_file_lookup(file, "game.ruleset.governments");
+ section_file_lookup(file, "game.ruleset.nations");
+ section_file_lookup(file, "game.ruleset.cities");
+
+ sz_strlcpy(game.rulesetdir,
secfile_lookup_str_default(file, string,
"game.ruleset.game"));
+ } else {
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Any sufficiently advanced technology is indistinguishable from magic."
-- Arthur C. Clarke
|
|