diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2017-01-01 16:13:01 +0100 |
---|---|---|
committer | Loic Blot <loic.blot@unix-experience.fr> | 2017-01-01 23:11:26 +0100 |
commit | 52ba1f867e5edb579a59a44fbb8286d4f1e54931 (patch) | |
tree | d95e2032d3fcf18bd972cc018e6b44470664d75c /src/remoteplayer.cpp | |
parent | a1346c916e1d0f0cde2ccecc680857896c717a3d (diff) | |
download | minetest-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/remoteplayer.cpp')
-rw-r--r-- | src/remoteplayer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/remoteplayer.cpp b/src/remoteplayer.cpp index 67ab89113..18bfa1030 100644 --- a/src/remoteplayer.cpp +++ b/src/remoteplayer.cpp @@ -148,7 +148,7 @@ void RemotePlayer::deSerialize(std::istream &is, const std::string &playername, } catch (SettingNotFoundException &e) {} try { - sao->setBreath(args.getS32("breath")); + sao->setBreath(args.getS32("breath"), false); } catch (SettingNotFoundException &e) {} } |