diff --git a/src/plugins/gta3/std.stream/data.cpp b/src/plugins/gta3/std.stream/data.cpp index 370dfac..7cfe5ec 100644 --- a/src/plugins/gta3/std.stream/data.cpp +++ b/src/plugins/gta3/std.stream/data.cpp @@ -82,7 +82,12 @@ std::string CAbstractStreaming::TryLoadNonStreamedResource(std::string filepath, if(!this->bHasInitializedStreaming) { - auto it = this->raw_models.find(filename); + auto it = std::find_if(this->raw_models.begin(), this->raw_models.end(), + [&filename](const std::pair& pair) { + auto model_filename = std::string(pair.second->filename()); + return model_filename == filename; + }); + if(it != this->raw_models.end()) { // Log about non streamed resource and make sure it's unique diff --git a/src/plugins/gta3/std.stream/streaming.cpp b/src/plugins/gta3/std.stream/streaming.cpp index eca6602..90ad4f5 100644 --- a/src/plugins/gta3/std.stream/streaming.cpp +++ b/src/plugins/gta3/std.stream/streaming.cpp @@ -202,7 +202,7 @@ bool CAbstractStreaming::InstallFile(const modloader::file& file) // Just push it to this list and it will get loaded when the streaming initializes // At this point we don't know if this is a clothing item or an model, for that reason "raw" // The initializer will take care of filtering clothes and models from the list - this->raw_models[file.filename()] = &file; + this->raw_models[file.filepath()] = &file; return true; } else @@ -242,7 +242,7 @@ bool CAbstractStreaming::UninstallFile(const modloader::file& file) return false; // Streaming hasn't initialized, just remove it from our raw list - raw_models.erase(file.filename()); + raw_models.erase(file.filepath()); return true; } else