Skip to content

Commit 42d9702

Browse files
Fix rpak aliasing not working when trying to alias towards a vanilla rpak (#825)
Replace incorrect variable with hardcoded `-1` Don't account for the modded path in pak aliases
1 parent 8a29c5b commit 42d9702

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

primedev/core/filesystem/rpakfilesystem.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,15 @@ void PakLoadManager::UnloadDependentPaks(PakHandle handle)
342342
static void HandlePakAliases(std::string& originalPath)
343343
{
344344
// convert the pak being loaded to its aliased one, e.g. aliasing mp_hub_timeshift => sp_hub_timeshift
345-
for (int64_t i = g_pModManager->m_LoadedMods.size() - 1; i > PakHandle::INVALID; i--)
345+
for (int64_t i = g_pModManager->m_LoadedMods.size() - 1; i > -1; i--)
346346
{
347347
Mod* mod = &g_pModManager->m_LoadedMods[i];
348348
if (!mod->m_bEnabled)
349349
continue;
350350

351351
if (mod->RpakAliases.find(originalPath) != mod->RpakAliases.end())
352352
{
353-
originalPath = (mod->m_ModDirectory / "paks" / mod->RpakAliases[originalPath]).string();
353+
originalPath = mod->RpakAliases[originalPath];
354354
return;
355355
}
356356
}

0 commit comments

Comments
 (0)