The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Dwachs on May 15, 2009, 01:04:39 PM

Title: bug: saving and loading of ai
Post by: Dwachs on May 15, 2009, 01:04:39 PM
The saving and loading of ai-players is currently disabled, since the function rdwr is not defined virtual in simplay.h. That means everytime a game is saved/loaded only the rdwr-function of the base class spieler_t is called. A fix, which simply inserts 'visual' there, will made all earlier savegames with ai-players unloadable.

How should this be fixed?

Title: Re: bug: saving and loading of ai
Post by: gerw on May 15, 2009, 01:13:24 PM
(Only vague assumptions, I didn't had a look at the code)
Can't this be solved by a new savegame version:
If version < ... => take old routine
otherwise save/load with new routine?
Title: Re: bug: saving and loading of ai
Post by: z9999 on May 15, 2009, 01:43:23 PM
I don't know what version the original topic is with.
But r2461 has saving problem. It freezed during saving a game.
(Really too slow saving and too big file size.)
I'm not sure this is the same problem or not.
Title: Re: bug: saving and loading of ai
Post by: prissi on May 15, 2009, 02:36:04 PM
Nothing six lines of code cannot fix ...