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

Improve p.HideEntity & p.ShowEntity #1031

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AkmalFairuz
Copy link
Contributor

@AkmalFairuz AkmalFairuz commented Mar 11, 2025

Current Problem

(*player.Player).ShowEntity() allows viewing entities outside the world and player chunks, which shouldn't be allowed. This may cause unexpected behavior when showing an entities out of player's chunk range and causing DEBUG entity runtime ID not found log spam

Changes

  • Track visible entities from (*session.Session).ViewEntity calls.
  • Added (*session.Session).doHideEntity & (*session.Session).doViewEntity

This may not be a good solution. Opinion needed.

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 this pull request may close these issues.

1 participant