Skip to content

Commit

Permalink
Fix node graphs being loaded from search paths other than GAMECONFIG …
Browse files Browse the repository at this point in the history
…path

Resolves #145
  • Loading branch information
SamVanheer committed Mar 28, 2022
1 parent a02eb83 commit 88df0a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dlls/nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2325,8 +2325,9 @@ bool CGraph::FLoadGraph(const char* szMapName)

const std::string fileName{std::string{"maps/graphs/"} + szMapName + ".nod"};

//Note: no path ID to allow loading graphs from addon content.
const auto buffer = FileSystem_LoadFileIntoBuffer(fileName.c_str());
//Note: "GAME" path ID to allow loading graphs from addon content.
//Do not allow loading from other games since they may have a different graph format.
const auto buffer = FileSystem_LoadFileIntoBuffer(fileName.c_str(), "GAME");

if (buffer.empty())
{
Expand Down

0 comments on commit 88df0a2

Please sign in to comment.