Skip to content

Commit

Permalink
player/player.go: Correctly compare player to entity in HideEntity (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AkmalFairuz authored Jan 23, 2025
1 parent f08686f commit 686920e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ func (p *Player) OpenBlockContainer(pos cube.Pos, tx *world.Tx) {
// HideEntity hides a world.Entity from the Player so that it can under no circumstance see it. Hidden entities can be
// made visible again through a call to ShowEntity.
func (p *Player) HideEntity(e world.Entity) {
if p.session() != session.Nop && p != e {
if p.session() != session.Nop && p.H() != e.H() {
p.session().StopShowingEntity(e)
}
}
Expand Down

0 comments on commit 686920e

Please sign in to comment.