Fix issues with uncleared variables when loading old save games.

pull/16/head
Jonathan G Rennison 7 years ago
parent 3fde2cb5b1
commit 702404dc6a

@ -327,6 +327,10 @@ static void SwapPackets(GoodsEntry *ge)
static void Load_STNS()
{
_cargo_source_xy = 0;
_cargo_days = 0;
_cargo_feeder_share = 0;
int index;
while ((index = SlIterateArray()) != -1) {
Station *st = new (index) Station();
@ -519,8 +523,9 @@ static void Save_STNN()
static void Load_STNN()
{
int index;
_num_flows = 0;
int index;
while ((index = SlIterateArray()) != -1) {
bool waypoint = (SlReadByte() & FACIL_WAYPOINT) != 0;

Loading…
Cancel
Save