(svn r3356) - Remove unused parameter of AfterLoadGame().
- Initialize _sl_version after loading an old savegame.
--- a/openttd.c Thu Dec 29 19:09:05 2005 +0000
+++ b/openttd.c Thu Dec 29 22:28:19 2005 +0000
@@ -1096,7 +1096,7 @@
extern void UpdateOldAircraft( void );
extern void UpdateOilRig( void );
-bool AfterLoadGame(uint version)
+bool AfterLoadGame(void)
{
Window *w;
ViewPort *vp;
--- a/saveload.c Thu Dec 29 19:09:05 2005 +0000
+++ b/saveload.c Thu Dec 29 22:28:19 2005 +0000
@@ -1233,7 +1233,7 @@
// actual loader/saver function
void InitializeGame(uint size_x, uint size_y);
-extern bool AfterLoadGame(uint version);
+extern bool AfterLoadGame(void);
extern void BeforeSaveGame(void);
extern bool LoadOldSaveGame(const char *file);
@@ -1365,7 +1365,8 @@
if (mode == SL_OLD_LOAD) {
InitializeGame(256, 256); // set a mapsize of 256x256 for TTDPatch games or it might get confused
if (!LoadOldSaveGame(filename)) return SL_REINIT;
- AfterLoadGame(0);
+ _sl_version = 0;
+ AfterLoadGame();
return SL_OK;
}
@@ -1494,7 +1495,7 @@
/* After loading fix up savegame for any internal changes that
* might've occured since then. If it fails, load back the old game */
- if (!AfterLoadGame(version)) return SL_REINIT;
+ if (!AfterLoadGame()) return SL_REINIT;
}
return SL_OK;