minetest-mods / i3

:rocket: A next-generation inventory for Minetest 5.6+
Other
41 stars 26 forks source link

Limit hudchange calls and merge globalstep #90

Closed MKabe closed 1 year ago

MKabe commented 1 year ago

Hello,

I make this pull request based on the issue i make yesterday #89 It's my first one, hope I don't do too much mistake..

I limited the calls of hudchange to reduce exchange with the client as strict necessary for wielditem hud (1 packet for 1 change instead of thousands / sec)

I also merge the 2 globalstep function as they have the same purpose and the same loop

Also changed the "wdesc_y -= xxx" as it look it's not supported by lua

kilbith commented 1 year ago

These calls are already limited by latest commit and your code is bad.