diff options
author | sleirsgoevy <sleirsgoevy@gmail.com> | 2024-11-01 23:20:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-01 23:20:13 +0100 |
commit | 7e4abd7dd09ed8f88471db7369c9e8fb5247416f (patch) | |
tree | 314f7bdcd4971b60c7b8b2fc18681ba940741613 | |
parent | Save changed maps every 5 minutes (#5557) (diff) | |
download | cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar.gz cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar.bz2 cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar.lz cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar.xz cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.tar.zst cuberite-7e4abd7dd09ed8f88471db7369c9e8fb5247416f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
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); } |