mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(svn r2030) -Fix: Save _cur_town_ctr with all its bits to prevent desyncs
This commit is contained in:
parent
6f41ecfe9e
commit
239aa75504
8
misc.c
8
misc.c
@ -772,12 +772,8 @@ static const SaveLoadGlobVarList _date_desc[] = {
|
|||||||
{&_station_tick_ctr, SLE_UINT16, 0, 255},
|
{&_station_tick_ctr, SLE_UINT16, 0, 255},
|
||||||
{&_random_seeds[0][0], SLE_UINT32, 0, 255},
|
{&_random_seeds[0][0], SLE_UINT32, 0, 255},
|
||||||
{&_random_seeds[0][1], SLE_UINT32, 0, 255},
|
{&_random_seeds[0][1], SLE_UINT32, 0, 255},
|
||||||
/* XXX: We save only a portion of the _cur_town_ctr, this should be
|
{&_cur_town_ctr, SLE_FILE_U8 | SLE_VAR_U32, 0, 9},
|
||||||
* fixed in the next revision bump. It does not hurt so much since
|
{&_cur_town_ctr, SLE_UINT32, 10, 255},
|
||||||
* it just gives a small single-time penalty to the towns with higher
|
|
||||||
* IDs at the load time. _cur_town_ctr is zeroed in InitializeTowns()
|
|
||||||
* so the higher octets do not interfere at this time. */
|
|
||||||
{&_cur_town_ctr, SLE_UINT8, 0, 255},
|
|
||||||
{&_cur_player_tick_index, SLE_FILE_U8 | SLE_VAR_UINT, 0, 255},
|
{&_cur_player_tick_index, SLE_FILE_U8 | SLE_VAR_UINT, 0, 255},
|
||||||
{&_next_competitor_start, SLE_FILE_U16 | SLE_VAR_UINT, 0, 255},
|
{&_next_competitor_start, SLE_FILE_U16 | SLE_VAR_UINT, 0, 255},
|
||||||
{&_trees_tick_ctr, SLE_UINT8, 0, 255},
|
{&_trees_tick_ctr, SLE_UINT8, 0, 255},
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "saveload.h"
|
#include "saveload.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SAVEGAME_MAJOR_VERSION = 9,
|
SAVEGAME_MAJOR_VERSION = 10,
|
||||||
SAVEGAME_MINOR_VERSION = 0,
|
SAVEGAME_MINOR_VERSION = 0,
|
||||||
|
|
||||||
SAVEGAME_LOADABLE_VERSION = (SAVEGAME_MAJOR_VERSION << 8) + SAVEGAME_MINOR_VERSION
|
SAVEGAME_LOADABLE_VERSION = (SAVEGAME_MAJOR_VERSION << 8) + SAVEGAME_MINOR_VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user