summaryrefslogtreecommitdiff
path: root/src/network/networkprotocol.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-01-01 16:13:01 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2017-01-01 23:11:26 +0100
commit52ba1f867e5edb579a59a44fbb8286d4f1e54931 (patch)
treed95e2032d3fcf18bd972cc018e6b44470664d75c /src/network/networkprotocol.h
parenta1346c916e1d0f0cde2ccecc680857896c717a3d (diff)
downloadminetest-52ba1f867e5edb579a59a44fbb8286d4f1e54931.tar.gz
minetest-52ba1f867e5edb579a59a44fbb8286d4f1e54931.tar.bz2
minetest-52ba1f867e5edb579a59a44fbb8286d4f1e54931.zip
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
Diffstat (limited to 'src/network/networkprotocol.h')
-rw-r--r--src/network/networkprotocol.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h
index 018b392b6..f65167380 100644
--- a/src/network/networkprotocol.h
+++ b/src/network/networkprotocol.h
@@ -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
*/