Core/Vmaps: Fixed a ton of error messages when trying to unload vmaps that was never loaded due to old code that was misssed.

This commit is contained in:
hondacrx
2020-12-16 00:22:53 -05:00
parent 73a9202e12
commit ae6fca8fc3
+3 -4
View File
@@ -115,8 +115,6 @@ namespace Game.Collision
return LoadResult.ReadFromFileFailed;
}
LoadResult result = LoadResult.FileNotFound;
TileFileOpenResult fileResult = OpenMapTileFile(VMapManager.VMapPath, iMapID, tileX, tileY, vm);
if (fileResult.File != null)
{
@@ -126,7 +124,7 @@ namespace Game.Collision
return LoadResult.VersionMismatch;
uint numSpawns = reader.ReadUInt32();
for (uint i = 0; i < numSpawns && result == LoadResult.Success; ++i)
for (uint i = 0; i < numSpawns; ++i)
{
// read model spawns
if (ModelSpawn.ReadFromFile(reader, out ModelSpawn spawn))
@@ -176,7 +174,8 @@ namespace Game.Collision
{
iLoadedTiles[PackTileID(tileX, tileY)] = false;
}
return result;
return LoadResult.Success;
}
public void UnloadMapTile(uint tileX, uint tileY, VMapManager vm)