-
Notifications
You must be signed in to change notification settings - Fork 34
Description
There's two Win32 API calls to SetCurrentDirectory()
(one sets the directory to data directory in the game's root folder and the other resets the directory back to the game root) likely done by the game itself when the car/ped group (or time cycle) .dat functions are called
This dance causes Modloader's path translator to use the wrong current directory when generating the file paths (which leads to broken paths outside of the game's normal path); this behavior is noticeable in an extra islands mod where the game crashes once you approach the new islands (that's because the custom ped*.dat/car*.dat/timec*.dat files are being loaded at that time and they couldn't be found)
Also the mod mentioned above puts the car*.dat/ped*.dat/timec*.dat files inside of the main game's data
directory because of that bug (which isn't ideal because it pollutes the game's main files a bit)
I can think of two solutions for this:
- Patching the game's relevant functions to remove the
SetCurrentDirectory()
dance and use a game root-relative path (this shouldn't be too bad because the mod only supports very specific GTA SA versions) - Adding a special path workaround for
data
current directories (this might be too hacky though)