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

🐛 mob:facePlayer() causing crashes #6814

Open
3 tasks done
slashtangent opened this issue Jan 24, 2025 · 1 comment
Open
3 tasks done

🐛 mob:facePlayer() causing crashes #6814

slashtangent opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@slashtangent
Copy link
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my issue will be ignored.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have searched existing issues to see if the issue has already been opened, and I have checked the commit log to see if the issue has been resolved since my server was last updated.

OS / platform the server is running (if known)

Windows 10

Branch affected by issue

base

Steps to reproduce

Use mob:facePlayer(target, true) in your code, zone/logout and the server will crash when a mob attempts to call mob:facePlayer(target, true).

ai_container.cpp exception gets thrown if the targeted player is logged out when a mob attempts to mob:facePlayer(target, true)

Image

Expected behavior

Server does not crash.

@slashtangent slashtangent added the bug Something isn't working label Jan 24, 2025
@WinterSolstice8
Copy link
Member

I am making a PR to improve the safety of this so it doesnt happen but storing a player ref is prone to crashing and really not ideal in general

you should store the long-form player ID and look up that player in the future

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

No branches or pull requests

2 participants