diff options
author | presstabstart <presstabstart@users.noreply.github.com> | 2017-04-07 04:32:50 +0100 |
---|---|---|
committer | Auke Kok <sofar+github@foo-projects.org> | 2017-04-06 20:32:50 -0700 |
commit | 351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19 (patch) | |
tree | c0f1bedcd3ebfaf1d80ebf11fee78ecb85bdd2be /src/server.cpp | |
parent | 63e175dd70898e2ae714a025d1eaee45a453d41c (diff) | |
download | minetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.tar.gz minetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.tar.bz2 minetest-351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19.zip |
Fix multiple death messages (#5305)
Fix multiple death messages (#3565) and damage server logs after death.
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp index 0daa61054..224af47a7 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1111,16 +1111,15 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id) // Send inventory SendInventory(playersao); - // Send HP - SendPlayerHPOrDie(playersao); + // Send HP or death screen + if (playersao->isDead()) + SendDeathscreen(peer_id, false, v3f(0,0,0)); + else + SendPlayerHPOrDie(playersao); // Send Breath SendPlayerBreath(playersao); - // Show death screen if necessary - if (playersao->isDead()) - SendDeathscreen(peer_id, false, v3f(0,0,0)); - // Note things in chat if not in simple singleplayer mode if (!m_simple_singleplayer_mode && g_settings->getBool("show_statusline_on_connect")) { // Send information about server to player in chat |