Skip to content

Commit 686920e

Browse files
authored
player/player.go: Correctly compare player to entity in HideEntity (#998)
1 parent f08686f commit 686920e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/player/player.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2312,7 +2312,7 @@ func (p *Player) OpenBlockContainer(pos cube.Pos, tx *world.Tx) {
23122312
// HideEntity hides a world.Entity from the Player so that it can under no circumstance see it. Hidden entities can be
23132313
// made visible again through a call to ShowEntity.
23142314
func (p *Player) HideEntity(e world.Entity) {
2315-
if p.session() != session.Nop && p != e {
2315+
if p.session() != session.Nop && p.H() != e.H() {
23162316
p.session().StopShowingEntity(e)
23172317
}
23182318
}

0 commit comments

Comments
 (0)