Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game will crash when trying to enter the shipworks after playing the campaign #1

Closed
logdot opened this issue Aug 19, 2022 · 1 comment · Fixed by #4
Closed

Game will crash when trying to enter the shipworks after playing the campaign #1

logdot opened this issue Aug 19, 2022 · 1 comment · Fixed by #4
Labels
bug Something isn't working

Comments

@logdot
Copy link
Owner

logdot commented Aug 19, 2022

No description provided.

@logdot logdot added the bug Something isn't working label Aug 19, 2022
@logdot logdot transferred this issue from logdot/Highfleet-Modloader Sep 3, 2022
@logdot
Copy link
Owner Author

logdot commented Sep 7, 2022

The game will still crash even if using a vanilla game and attempting to load no parts. This is different to #2, where you need to have edited game files to trigger the crash

logdot added a commit that referenced this issue Sep 7, 2022
This is a very dumb fix, but it works while my understanding of the game
code is still low. The game before assigining all of the parts of the
library checks if that library exists already in memory, if it does it
will call a class function that seems to pertain to the objects
properties.

If the modloader was active this function would fail because the this
pointer would be garbage when calling it. To circunvent this I simply
don't call the function anymore. A better fix would be to investigate
why the this pointer is malformed or only call the function when it's
the expected value (I would assume the global library would always be
the correct one?)

This fixes #1
Further investigation is needed to determine if this affects #2 too, as
I have a suspicion that it might.
@logdot logdot mentioned this issue Sep 7, 2022
@logdot logdot closed this as completed in #4 Sep 7, 2022
logdot added a commit that referenced this issue Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant