Bump savegame for object ground types

This commit is contained in:
Jonathan G Rennison
2021-12-05 21:45:36 +00:00
parent de6cf4de24
commit 2d71ec1c5a
3 changed files with 15 additions and 0 deletions

View File

@@ -68,6 +68,7 @@
#include "../company_func.h"
#include "../infrastructure_func.h"
#include "../event_logs.h"
#include "../newgrf_object.h"
#include "saveload_internal.h"
@@ -3979,6 +3980,17 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeatureMissing(XSLFI_OBJECT_GROUND_TYPES)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_OBJECT)) {
_m[t].m4 = 0;
ObjectType type = GetObjectType(t);
extern void SetShouldObjectHaveNoFoundation(TileIndex tile, Slope tileh, ObjectType type, const ObjectSpec *spec);
SetShouldObjectHaveNoFoundation(t, SLOPE_ELEVATED, type, ObjectSpec::Get(type));
}
}
}
InitializeRoadGUI();
/* This needs to be done after conversion. */