aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorpresstabstart <presstabstart@users.noreply.github.com>2017-04-07 04:32:50 +0100
committerAuke Kok <sofar+github@foo-projects.org>2017-04-06 20:32:50 -0700
commit351cc2e79a7d78f7ec97ff9b33e4f0bad4042b19 (patch)
treec0f1bedcd3ebfaf1d80ebf11fee78ecb85bdd2be /src/server.cpp
parent63e175dd70898e2ae714a025d1eaee45a453d41c (diff)
downloadminetest-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.cpp11
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