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 (R2Northstar#825)

Replace incorrect variable with hardcoded `-1`
Don't account for the modded path in pak aliases
  • Loading branch information
ASpoonPlaysGames authored and wolf109909 committed Nov 12, 2024
1 parent dc38d15 commit 05fadae
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 @@ -341,15 +341,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 05fadae

Please sign in to comment.