From 595afc4a93062e427c537947f092891e2f7022d6 Mon Sep 17 00:00:00 2001 From: Avery Date: Tue, 7 Dec 2021 00:25:19 -0800 Subject: [PATCH] Revert "Try to load from original zone path before a lowercased one" --- dZoneManager/Zone.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/dZoneManager/Zone.cpp b/dZoneManager/Zone.cpp index 95bb07bc..68adb943 100644 --- a/dZoneManager/Zone.cpp +++ b/dZoneManager/Zone.cpp @@ -42,15 +42,7 @@ void Zone::LoadZoneIntoMemory() { m_ZonePath = m_ZoneFilePath.substr(0, m_ZoneFilePath.rfind('/') + 1); if (m_ZoneFilePath == "ERR") return; - // try to open with regular cased path first std::ifstream file(m_ZoneFilePath, std::ios::binary); - if (!file) { - // if that fails try the path in lowercase - std::transform(m_ZoneFilePath.begin(), m_ZoneFilePath.end(), m_ZoneFilePath.begin(), ::tolower); - - file.open(m_ZoneFilePath, std::ios::binary); - } - if (file) { BinaryIO::BinaryRead(file, m_ZoneFileFormatVersion); @@ -179,7 +171,8 @@ std::string Zone::GetFilePathForZoneID() { CDZoneTableTable * zoneTable = CDClientManager::Instance()->GetTable("ZoneTable"); const CDZoneTable* zone = zoneTable->Query(this->GetZoneID().GetMapID()); if (zone != nullptr) { - std::string toReturn = "./res/maps/" + zone->zoneName; + std::string toReturn = "./res/maps/" + zone->zoneName; + std::transform(toReturn.begin(), toReturn.end(), toReturn.begin(), ::tolower); return toReturn; }