Various compatibility fixes for Upstate Liberty#130
Open
CookiePLMonster wants to merge 5 commits intothelink2012:developfrom
Open
Various compatibility fixes for Upstate Liberty#130CookiePLMonster wants to merge 5 commits intothelink2012:developfrom
CookiePLMonster wants to merge 5 commits intothelink2012:developfrom
Conversation
Fixes loading gtadebug through modloader, main_d.scm and main_freeroam.scm are now loadable
…ed in scripts When the ASI is in 'scripts', 'plugins' or 'mss', we should assume that the "mod root directory" is the parent directory. Therefore, go one directory up when translating paths.
Two reasons for this:
1. We have to take care when CLEO is trying to open a new custom script,
it will try to do so from [chdir("CLEO")], so using an absolute path
helps us avoid "undoing" it.
2. For some data files (like main.scm), the game does a [chdir("data")]
([chdir("data\scripts")] in San Andreas) and loads the file then.
Using an absolute path, we don't need to care about this.
This makes Upstate Liberty fully loadable through ML
The destructor of Profiles was iterating through the list in the middle of its clear() call. This crashes consistently with VS2017.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a set of bugs and missing features in Modloader that prevented Upstate Liberty for GTA III from loading correctly.
main_d.scmplaced in a Modloader directory loadable through gtadebug.scripts,pluginsandmssnow translate paths relatively to their parent path. The reasoning is that the path above any of the three is most likely the "mod root directory", and so the assumption is that files should load relatively to those. This fixes a case where the following mod structure worked standalone, but failed with Modloader:chdir("data")(or similar) now work correctly. In the current version of Modloader, that current directory was correctly reconstructed inside the mod directory, but the actualchdirwas not countered, so the game tried to load files from paths like:gta3\data\modloader\mod_dir\data\file.datBy using absolute paths, Modloader doesn't need to care about this
chdirat all, and there is no need to try and traverse the directory back.MAPZONEdefinitions (map.zonfile) has been added. This III-exclusive DAT definition has an identical syntax toIPL, so the IPL overrider was extended to also support this.this->profilesin the middle of athis->profiles.clear()call consistently crashed. I untangled the code so the destructors ofProfiledon't touch this container at all, and instead it's the container's responsibility to unregister everything up front.This set of fixes makes Upstate Liberty fully loadable from Modloader - just extract the mod archive to


modloader\and go.Fixes #123. Fixes #127.