Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/plugins/gta3/std.stream/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ 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<std::string, const modloader::file *>& pair) {
return std::string(pair.second->filename()) == filename;
});

if(it != this->raw_models.end())
{
// Log about non streamed resource and make sure it's unique
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/gta3/std.stream/streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down