Skip to content

Commit

Permalink
Fix rpak aliasing not working when trying to alias towards a vanilla …
Browse files Browse the repository at this point in the history
…rpak (#825)

Replace incorrect variable with hardcoded `-1`
Don't account for the modded path in pak aliases
  • Loading branch information
ASpoonPlaysGames authored Oct 6, 2024
1 parent 8a29c5b commit 42d9702
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions primedev/core/filesystem/rpakfilesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ void PakLoadManager::UnloadDependentPaks(PakHandle handle)
static void HandlePakAliases(std::string& originalPath)
{
// convert the pak being loaded to its aliased one, e.g. aliasing mp_hub_timeshift => sp_hub_timeshift
for (int64_t i = g_pModManager->m_LoadedMods.size() - 1; i > PakHandle::INVALID; i--)
for (int64_t i = g_pModManager->m_LoadedMods.size() - 1; i > -1; i--)
{
Mod* mod = &g_pModManager->m_LoadedMods[i];
if (!mod->m_bEnabled)
continue;

if (mod->RpakAliases.find(originalPath) != mod->RpakAliases.end())
{
originalPath = (mod->m_ModDirectory / "paks" / mod->RpakAliases[originalPath]).string();
originalPath = mod->RpakAliases[originalPath];
return;
}
}
Expand Down

0 comments on commit 42d9702

Please sign in to comment.