mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Disable loading room editor if the current house is damaged beyond repair, and re-enable loading a different house.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user