mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r19435) -Fix: when loading a savegame created with a house newgrf without that newgrf available all houses became tall office blocks
This commit is contained in:
parent
604da97364
commit
05d29d8a3d
@ -136,7 +136,7 @@ uint16 OverrideManagerBase::AddEntityID(byte grf_local_id, uint32 grfid, byte su
|
|||||||
* @param entity_id of the entity being queried
|
* @param entity_id of the entity being queried
|
||||||
* @return mapped id
|
* @return mapped id
|
||||||
*/
|
*/
|
||||||
uint16 OverrideManagerBase::GetSubstituteID(byte entity_id)
|
uint16 OverrideManagerBase::GetSubstituteID(uint16 entity_id)
|
||||||
{
|
{
|
||||||
return mapping_ID[entity_id].substitute_id;
|
return mapping_ID[entity_id].substitute_id;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
void Add(uint8 local_id, uint32 grfid, uint entity_type);
|
void Add(uint8 local_id, uint32 grfid, uint entity_type);
|
||||||
virtual uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id);
|
virtual uint16 AddEntityID(byte grf_local_id, uint32 grfid, byte substitute_id);
|
||||||
|
|
||||||
uint16 GetSubstituteID(byte entity_id);
|
uint16 GetSubstituteID(uint16 entity_id);
|
||||||
virtual uint16 GetID(uint8 grf_local_id, uint32 grfid);
|
virtual uint16 GetID(uint8 grf_local_id, uint32 grfid);
|
||||||
|
|
||||||
inline uint16 GetMaxMapping() { return max_new_entities; }
|
inline uint16 GetMaxMapping() { return max_new_entities; }
|
||||||
|
@ -40,7 +40,7 @@ void UpdateHousesAndTowns()
|
|||||||
|
|
||||||
if (!IsTileType(t, MP_HOUSE)) continue;
|
if (!IsTileType(t, MP_HOUSE)) continue;
|
||||||
|
|
||||||
house_id = GetHouseType(t);
|
house_id = GetCleanHouseType(t);
|
||||||
if (!HouseSpec::Get(house_id)->enabled && house_id >= NEW_HOUSE_OFFSET) {
|
if (!HouseSpec::Get(house_id)->enabled && house_id >= NEW_HOUSE_OFFSET) {
|
||||||
/* The specs for this type of house are not available any more, so
|
/* The specs for this type of house are not available any more, so
|
||||||
* replace it with the substitute original house type. */
|
* replace it with the substitute original house type. */
|
||||||
|
Loading…
Reference in New Issue
Block a user