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

/reload libs breaks 'lookAt' funcionality #4304

Closed
2 tasks done
xmish opened this issue Jan 28, 2023 · 1 comment · Fixed by #4343
Closed
2 tasks done

/reload libs breaks 'lookAt' funcionality #4304

xmish opened this issue Jan 28, 2023 · 1 comment · Fixed by #4343

Comments

@xmish
Copy link
Contributor

xmish commented Jan 28, 2023

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. type /reload libs (Reloaded libs. shows)
  2. onLook event callback no longer works (function Player:onLook(thing, position, distance) is called but results with empty description)
  3. No text is shown on look at items

Expected behaviour

Reloads does not break lookAt functionality

Actual behaviour

No lookAt text is shown after reload libs.

Environment

Reproduction environment

@xmish
Copy link
Contributor Author

xmish commented Jan 28, 2023

In addition EventCallback.onLook is nil after reload.
/reload scripts sems to fix the issue thanks to that in reload.lua:

-- need to clear EventCallback.data or we end up having duplicated events on /reload scripts
if table.contains({RELOAD_TYPE_SCRIPTS, RELOAD_TYPE_ALL}, reloadType) then
	EventCallback:clear()
end

Actualy it does it thanks to fact that it loads default eventcallbacks from scripts e.g. default_onLook.lua

@MillhioreBT MillhioreBT mentioned this issue Mar 8, 2023
3 tasks
@EPuncker EPuncker linked a pull request Mar 8, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant