diff options
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server.cpp b/src/server.cpp index c9d5c7129..fa7a838d4 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2557,15 +2557,15 @@ void Server::RespawnPlayer(u16 peer_id) playersao->setHP(PLAYER_MAX_HP); playersao->setBreath(PLAYER_MAX_BREATH); - SendPlayerHP(peer_id); - SendPlayerBreath(peer_id); - bool repositioned = m_script->on_respawnplayer(playersao); - if(!repositioned){ + if (!repositioned) { v3f pos = findSpawnPos(); // setPos will send the new position to client playersao->setPos(pos); } + + SendPlayerHP(peer_id); + SendPlayerBreath(peer_id); } |