[Runtime Issue]: Missing objects due to upper case HOG file names
Closed this issue ยท 3 comments
Build Version
Operating System Environment
- Microsoft Windows (32-bit)
- Microsoft Windows (64-bit)
- Mac OS X
- Linux (specify distribution and version below)
CPU Environment
- x86 (32-bit Intel/AMD)
- x86_64 (64-bit Intel/AMD)
- ARM (32-bit)
- ARM64 (64-bit; sometimes called AArch64)
- Other (RISC V, PPC...)
Game Modes Affected
- Single player
- Anarchy
- Hyper-Anarchy
- Robo-Anarchy
- Team Anarchy
- Capture the Flag
- Bounty
- Entropy
- Hoard
- Monsterball
- Cooperative
Game Environment
Linux 64-bit build on Debian stable (12.5), but issue likely on all case-sensitive file systems where original game content contains upper case file names.
Description
After recent changes (commit f7b19d0bf4f0315ba0e6f6ce1e3db58932b05d8e - Fix mercenary features) my local build failed to reach the first menu screen due to a missing object GuideBotRed
that was referenced in the above commit.
On investigation I discovered that this object exists in the EXTRA1.HOG
and EXTRA.HOG
files in my GOG-supplied original content, but these HOGs were not being loaded due to their upper case file names.
Renaming the files (see my updated discussion: #93) fixes the problem, however I wonder if it would be prudent to support case-insensitive loading in the cfile
module?
Regression Status
Issue not present: ad78f4d
Issue present: f7b19d0
Steps to Reproduce
Issue occurs when loading the game, if both EXTRA?.HOG
files have any uppercase characters in their name, preventing them from loading.
Related to #262.
We have two options here: disable the red guidebot if not found (so the game loads), or add case insensitivity, which is what we should do. The former is a band-aid, the latter is the solution.
Here's what happened: the red guidebot was outright disabled on linux and mac. You wouldn't have seen it even if extra.hog and extra1.hog were loaded correctly. But, since the engine wasn't case-insensitive anyway, the digital releases would end up doing two things:
- In steam,
extra.hog
would load in place ofextra1.hog
, so the game would be missing the patches inextra1.hog
. - In GOG, neither
EXTRA1.HOG
OREXTRA.HOG
would be loaded. Mercenary missions were probably unplayable, and if they were playable, they were likely broken.