-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send HUD flags only if changed #12037
Conversation
yes please <3 could this be done with all object properties? This is a very easy thing to do wrong for modders. |
actually mtg itself is doing this wrong: luanti-org/minetest_game#2900 |
A looong time ago I fixed a bug in the nssm mod (explanation here, got merged in tenPlus1's fork later: NPXcoot/nssm#22). Not the same, but similar problem, where a mod can send block updates that starve out all other block updates from the server (the client stopped loading any other blocks). Definitely something the engine should fix - to some extend (f.e. not sending blocks that have not changed). (Posted on wrong issue before) |
I guess I do have to include reasoning as to why this belongs in the engine and not the games/mods using the API, so here it is:
|
Literally every occurrence of hud_set_flags (and set_properties and set_bones and maybe others ?) in a game/mod needs to check first ideally (we usually don't if it just happens once but it is still redundant traffic). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an optimization, this is fine by me. HUD flags are sent as reliable and often updated in mods. However, mods should still try to be efficient in general, especially because other functions do not have such redundancy checks (HUD elements).
Supposedly fixes luanti-org/minetest_game#2900