mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02: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:
@@ -138,9 +138,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
Add nodedef v3 - connected nodeboxes
|
||||
PROTOCOL_VERSION 28:
|
||||
CPT2_MESHOPTIONS
|
||||
PROTOCOL_VERSION 29:
|
||||
Server doesn't accept TOSERVER_BREATH anymore
|
||||
*/
|
||||
|
||||
#define LATEST_PROTOCOL_VERSION 28
|
||||
#define LATEST_PROTOCOL_VERSION 29
|
||||
|
||||
// Server's supported network protocol range
|
||||
#define SERVER_PROTOCOL_VERSION_MIN 13
|
||||
@@ -833,7 +835,7 @@ enum ToServerCommand
|
||||
<no payload data>
|
||||
*/
|
||||
|
||||
TOSERVER_BREATH = 0x42,
|
||||
TOSERVER_BREATH = 0x42, // Obsolete
|
||||
/*
|
||||
u16 breath
|
||||
*/
|
||||
|
Reference in New Issue
Block a user