mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Remove client-side chat prediction. (#5055)
Network lag isn't really a big issue with chat and chat prediction makes writing mods harder.
This commit is contained in:
parent
d2f5732f89
commit
2f56a00d9e
4 changed files with 17 additions and 4 deletions
|
@ -2826,7 +2826,15 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna
|
|||
|
||||
std::vector<u16> clients = m_clients.getClientIDs();
|
||||
|
||||
/*
|
||||
Send the message back to the inital sender
|
||||
if they are using protocol version >= 29
|
||||
*/
|
||||
|
||||
u16 peer_id_to_avoid_sending = (player ? player->peer_id : PEER_ID_INEXISTENT);
|
||||
if (player->protocol_version >= 29)
|
||||
peer_id_to_avoid_sending = PEER_ID_INEXISTENT;
|
||||
|
||||
for (u16 i = 0; i < clients.size(); i++) {
|
||||
u16 cid = clients[i];
|
||||
if (cid != peer_id_to_avoid_sending)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue