summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-04 23:28:57 +0100
committerAlexander Harkness <me@bearbin.net>2024-11-04 23:28:57 +0100
commit09ab9dba1b46f1731276d3fd818293590e3e6e59 (patch)
tree06613303f5500224b04cc68cfb05cebd96d9cabe /src/Entities/Player.cpp
parentCount non-air blocks and use the real count not 4096. (diff)
parentTemp fix for disappearing chunk sections in 1.14 (#5560) (diff)
downloadcuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.gz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.bz2
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.lz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.xz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.zst
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index c580d8293..de99a299d 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -982,6 +982,13 @@ void cPlayer::Respawn(void)
TeleportToCoords(m_RespawnPosition.x, m_RespawnPosition.y, m_RespawnPosition.z);
}
+ // The Notchian client enters a weird glitched state when trying to "resurrect" dead players
+ // To prevent that, destroy the existing client-side entity, and create a new one with the same ID
+ // This does not make any difference to more modern clients
+ m_World->BroadcastDestroyEntity(*this, &*m_ClientHandle);
+ m_World->BroadcastSpawnEntity(*this, &*m_ClientHandle);
+
+
SetVisible(true);
}