diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-16 00:19:45 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-16 00:19:45 +0200 |
commit | 75733f3c83926b3669b63a0b632789216870e229 (patch) | |
tree | 86784853dd870d2d7224b782177140fd4df4c1c9 /src/save | |
parent | merge readmes (diff) | |
parent | fix Bait crash (diff) | |
download | re3-75733f3c83926b3669b63a0b632789216870e229.tar re3-75733f3c83926b3669b63a0b632789216870e229.tar.gz re3-75733f3c83926b3669b63a0b632789216870e229.tar.bz2 re3-75733f3c83926b3669b63a0b632789216870e229.tar.lz re3-75733f3c83926b3669b63a0b632789216870e229.tar.xz re3-75733f3c83926b3669b63a0b632789216870e229.tar.zst re3-75733f3c83926b3669b63a0b632789216870e229.zip |
Diffstat (limited to 'src/save')
-rw-r--r-- | src/save/GenericGameStorage.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index 0ec0b117..1e4acd3d 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -154,8 +154,17 @@ GenericSave(int file) WriteDataToBufferPointer(buf, CompileDateAndTime.m_nMonth); WriteDataToBufferPointer(buf, CompileDateAndTime.m_nYear); WriteDataToBufferPointer(buf, CWeather::WeatherTypeInList); +#ifdef FIX_BUGS + // converted to float for compatibility with original format + // TODO: maybe remove this? not really gonna break anything vital + float f = TheCamera.CarZoomIndicator; + WriteDataToBufferPointer(buf, f); + f = TheCamera.PedZoomIndicator; + WriteDataToBufferPointer(buf, f); +#else WriteDataToBufferPointer(buf, TheCamera.CarZoomIndicator); WriteDataToBufferPointer(buf, TheCamera.PedZoomIndicator); +#endif assert(buf - work_buff == SIZE_OF_SIMPLEVARS); // Save scripts, block is nested within the same block as simple vars for some reason @@ -264,8 +273,18 @@ GenericLoad() ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nMonth); ReadDataFromBufferPointer(buf, CompileDateAndTime.m_nYear); ReadDataFromBufferPointer(buf, CWeather::WeatherTypeInList); +#ifdef FIX_BUGS + // converted to float for compatibility with original format + // TODO: maybe remove this? not really gonna break anything vital + float f; + ReadDataFromBufferPointer(buf, f); + TheCamera.CarZoomIndicator = f; + ReadDataFromBufferPointer(buf, f); + TheCamera.PedZoomIndicator = f; +#else ReadDataFromBufferPointer(buf, TheCamera.CarZoomIndicator); ReadDataFromBufferPointer(buf, TheCamera.PedZoomIndicator); +#endif assert(buf - work_buff == SIZE_OF_SIMPLEVARS); ReadDataFromBlock("Loading Scripts \n", CTheScripts::LoadAllScripts); |