mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Breath cheat fix: server side
Breath is now handled server side. Changing this behaviour required some modifications to core: * Ignore TOSERVER_BREATH package, marking it as obsolete * Clients doesn't send the breath to server anymore * Use PlayerSAO pointer instead of peer_id in Server::SendPlayerBreath to prevent a useless lookup (little perf gain) * drop a useless static_cast in emergePlayer
This commit is contained in:
parent
a1346c916e
commit
52ba1f867e
13 changed files with 107 additions and 113 deletions
|
@ -180,7 +180,6 @@ public:
|
|||
void handleCommand_InventoryAction(NetworkPacket* pkt);
|
||||
void handleCommand_ChatMessage(NetworkPacket* pkt);
|
||||
void handleCommand_Damage(NetworkPacket* pkt);
|
||||
void handleCommand_Breath(NetworkPacket* pkt);
|
||||
void handleCommand_Password(NetworkPacket* pkt);
|
||||
void handleCommand_PlayerItem(NetworkPacket* pkt);
|
||||
void handleCommand_Respawn(NetworkPacket* pkt);
|
||||
|
@ -358,7 +357,7 @@ public:
|
|||
void printToConsoleOnly(const std::string &text);
|
||||
|
||||
void SendPlayerHPOrDie(PlayerSAO *player);
|
||||
void SendPlayerBreath(u16 peer_id);
|
||||
void SendPlayerBreath(PlayerSAO *sao);
|
||||
void SendInventory(PlayerSAO* playerSAO);
|
||||
void SendMovePlayer(u16 peer_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue