aboutsummaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorsavilli <78875209+savilli@users.noreply.github.com>2022-01-15 17:44:55 +0100
committerGitHub <noreply@github.com>2022-01-15 17:44:55 +0100
commit72b14bd994659163d4c2ea0d769d329df8a0f937 (patch)
treec293dd27aace5f2720fd301463e76a3dc4f2ffe2 /src/server.h
parent76e97e85a08ce71fea7654c729787c6c4409e0d8 (diff)
downloadminetest-72b14bd994659163d4c2ea0d769d329df8a0f937.tar.gz
minetest-72b14bd994659163d4c2ea0d769d329df8a0f937.tar.bz2
minetest-72b14bd994659163d4c2ea0d769d329df8a0f937.zip
Don't call on_dieplayer callback two times (#11874)
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server.h b/src/server.h
index 12158feb7..2741b3157 100644
--- a/src/server.h
+++ b/src/server.h
@@ -350,7 +350,8 @@ public:
void printToConsoleOnly(const std::string &text);
- void SendPlayerHPOrDie(PlayerSAO *player, const PlayerHPChangeReason &reason);
+ void HandlePlayerHPChange(PlayerSAO *sao, const PlayerHPChangeReason &reason);
+ void SendPlayerHP(PlayerSAO *sao);
void SendPlayerBreath(PlayerSAO *sao);
void SendInventory(PlayerSAO *playerSAO, bool incremental);
void SendMovePlayer(session_t peer_id);
@@ -438,7 +439,6 @@ private:
virtual void SendChatMessage(session_t peer_id, const ChatMessage &message);
void SendTimeOfDay(session_t peer_id, u16 time, f32 time_speed);
- void SendPlayerHP(session_t peer_id);
void SendLocalPlayerAnimations(session_t peer_id, v2s32 animation_frames[4],
f32 animation_speed);
@@ -510,7 +510,7 @@ private:
Something random
*/
- void DiePlayer(session_t peer_id, const PlayerHPChangeReason &reason);
+ void HandlePlayerDeath(PlayerSAO* sao, const PlayerHPChangeReason &reason);
void RespawnPlayer(session_t peer_id);
void DeleteClient(session_t peer_id, ClientDeletionReason reason);
void UpdateCrafting(RemotePlayer *player);