Skip to content

Commit

Permalink
Merge pull request #767 from WALLOFJUSTICE/dev-23-aug
Browse files Browse the repository at this point in the history
* fix limbs files not being moddable
  • Loading branch information
WALLOFJUSTICE authored Aug 15, 2023
2 parents eebb460 + 48a69de commit 9b98438
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4898,9 +4898,22 @@ void physfsReloadMonsterLimbFiles()
strcat(filename, monstertypename[c]);
strcat(filename, "/limbs.txt");
File* fp;
if ( (fp = openDataFile(filename, "rb")) == NULL )

if ( PHYSFS_getRealDir(filename) )
{
continue;
std::string limbsDir = PHYSFS_getRealDir(filename);
limbsDir.append(PHYSFS_getDirSeparator()).append(filename);
if ( (fp = openDataFile(limbsDir.c_str(), "rb")) == NULL )
{
continue;
}
}
else
{
if ( (fp = openDataFile(filename, "rb")) == NULL )
{
continue;
}
}

// read file
Expand Down

0 comments on commit 9b98438

Please sign in to comment.