Skip to content

Fix entity script destruction#2252

Open
ada-tv wants to merge 2 commits intooverte-org:masterfrom
ada-tv:fix/entity-script-destruction
Open

Fix entity script destruction#2252
ada-tv wants to merge 2 commits intooverte-org:masterfrom
ada-tv:fix/entity-script-destruction

Conversation

@ada-tv
Copy link
Copy Markdown
Collaborator

@ada-tv ada-tv commented May 2, 2026

ada-tv added 2 commits May 3, 2026 00:40
* Unload scripts that are auto-refreshing before restarting them. (overte-org#1697)
* Refactors `entityScriptChanging` to account for old and new URLs, was
  previously always setting them both to `""` and failing. (overte-org#2187)
* Cleaned up `EntityTreeRenderer::checkAndCallPreload` to be less
  confusing lol
@ada-tv ada-tv added bug Something isn't working needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested regression Something formerly worked and doesn't anymore cleanup labels May 2, 2026
@ada-tv ada-tv changed the title Fix/entity script destruction Fix entity script destruction May 2, 2026
@zedwick
Copy link
Copy Markdown
Collaborator

zedwick commented May 2, 2026

Things mostly work correctly, but there are a few outstanding edge cases which need some work:

  • Replacing the main client entity script url with the same as on the child script entity calls unload on the client entity script but not the script entity script, but does remove both scripts to replace them with one fresh client entity script.
  • Deleting the parent entity when it has both a client entity set and a child script entity will only call unload on the script entity's script.

And another minor issue I just noticed, somewhat unrelated:

  • Hitting reload after entering a client entity script url but before it has loaded the script will cause it to load the script just to unload it before loading it again.

Everything else seems to work as expected, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cleanup needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested regression Something formerly worked and doesn't anymore

Projects

None yet

2 participants