mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +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
|
@ -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) {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue