Disable loading room editor if the current house is damaged beyond repair, and re-enable loading a different house.

This commit is contained in:
elasota
2021-05-11 01:39:17 -04:00
parent 295db5f064
commit 318a5868d7
4 changed files with 31 additions and 15 deletions

View File

@@ -170,6 +170,9 @@ Boolean OpenHouse (Boolean read)
Boolean readOK = ReadHouse(houseStream, theHousesSpecs[thisHouseIndex].m_dir != PortabilityLayer::VirtualDirectories::kGameData);
houseStream->Close();
if (!readOK)
CloseHouse();
return readOK;
}
@@ -1964,7 +1967,10 @@ Boolean ReadHouse (GpIOStream *houseStream, bool untrusted)
#endif
if (thisHouse != nil)
{
thisHouse.Dispose();
thisHouse = nil;
}
if (byteCount < houseType::kBinaryDataSize)
{