Skip to content

Commit

Permalink
Fixing PVMs in mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Jul 12, 2015
1 parent 1900f38 commit 8208aa3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion SADXModLoader/TextureReplacement.cpp
Expand Up @@ -12,6 +12,10 @@
// Global
#include <SADXModLoader.h>

// FileMap from dllmain.cpp.
#include "FileMap.hpp"
extern FileMap sadx_fileMap;

// This
#include "TextureReplacement.h"

Expand Down Expand Up @@ -211,7 +215,7 @@ void __cdecl LoadPVM_C(const char* pvmName, NJS_TEXLIST* texList)

// Default behavior.
// Loads real PVM archives if no texture packs were found or successfully loaded.
if (FileExists("SYSTEM\\" + filename + ".PVM") || FileExists("SYSTEM\\" + filename))
if (FileExists(string(sadx_fileMap.replaceFile(("SYSTEM\\" + filename + ".PVM").c_str()))) || FileExists(string(sadx_fileMap.replaceFile(("SYSTEM\\" + filename).c_str()))))
{
LoadPVM_D_original(pvmName, texList);
return;
Expand Down

0 comments on commit 8208aa3

Please sign in to comment.