diff options
author | rubidium <rubidium@openttd.org> | 2009-07-22 08:59:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-22 08:59:57 +0000 |
commit | 68ead6b84f56ad3c93d05ad3e09b7fbb8173cf26 (patch) | |
tree | ee33bd19b96a138530a84e86e7ffd60c0700f9d9 /src/saveload/saveload.cpp | |
parent | 2646a99d29535a44c5998f080131cbca2e85bdcf (diff) | |
download | openttd-68ead6b84f56ad3c93d05ad3e09b7fbb8173cf26.tar.xz |
(svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
Diffstat (limited to 'src/saveload/saveload.cpp')
-rw-r--r-- | src/saveload/saveload.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 8b3178512..dd44cc4cd 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -41,7 +41,7 @@ #include "saveload_internal.h" -extern const uint16 SAVEGAME_VERSION = 122; +extern const uint16 SAVEGAME_VERSION = 123; SavegameType _savegame_type; ///< type of savegame we are loading @@ -873,6 +873,7 @@ size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld) break; case SL_WRITEBYTE: return 1; // a byte is logically of size 1 case SL_VEH_INCLUDE: return SlCalcObjLength(object, GetVehicleDescription(VEH_END)); + case SL_ST_INCLUDE: return SlCalcObjLength(object, GetBaseStationDescription()); default: NOT_REACHED(); } return 0; @@ -934,6 +935,10 @@ bool SlObjectMember(void *ptr, const SaveLoad *sld) SlObject(ptr, GetVehicleDescription(VEH_END)); break; + case SL_ST_INCLUDE: + SlObject(ptr, GetBaseStationDescription()); + break; + default: NOT_REACHED(); } return true; |