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

Fix reload global #4343

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Fix reload global #4343

merged 2 commits into from
Mar 9, 2023

Conversation

MillhioreBT
Copy link
Contributor

Pull Request Prelude

  • I have followed [proper The Forgotten Server code styling][code].
  • I have read and understood the [contribution guidelines][cont] before making this PR.
  • I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.

Changes Proposed

Because the global reload in luascript.cpp reloads the internal libraries of the revscript environment, the tables where the eventcallbacks are stored are cleaned up, so we must reload the scripts after the global reload.

I also modified the code of the Game.relaod method a bit so that it would return 1 or 2 values ​​as the case may be, since previously a boolean was being pushed to the stack that was not even returned, because only 1 value was being returned.

Issues addressed: #4304

According to the Issue lookAt fails, and yes, it's true, but so did all the related events, so it's a big problem if someone uses reloaded global 😩

@EPuncker EPuncker added the bugfix label Mar 8, 2023
@EPuncker EPuncker linked an issue Mar 8, 2023 that may be closed by this pull request
2 tasks
@EPuncker
Copy link
Contributor

EPuncker commented Mar 8, 2023

@xmish can you check this please?

@xmish
Copy link
Contributor

xmish commented Mar 8, 2023

Works fine 👍

@EPuncker EPuncker merged commit 1ca6c38 into otland:master Mar 9, 2023
@MillhioreBT MillhioreBT deleted the fix_reload_global branch March 9, 2023 02:21
EPuncker pushed a commit to EPuncker/forgottenserver that referenced this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/reload libs breaks 'lookAt' funcionality
3 participants