From ae6fca8fc3a066f8a1133ef4439675316b701f7f Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 16 Dec 2020 00:22:53 -0500 Subject: [PATCH] Core/Vmaps: Fixed a ton of error messages when trying to unload vmaps that was never loaded due to old code that was misssed. --- Source/Game/Collision/Maps/MapTree.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Game/Collision/Maps/MapTree.cs b/Source/Game/Collision/Maps/MapTree.cs index 746ecbb0e..1e12c9870 100644 --- a/Source/Game/Collision/Maps/MapTree.cs +++ b/Source/Game/Collision/Maps/MapTree.cs @@ -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)