minetest-mods / hbsprint

A flexible sprint mod supporting stamina, hunger and monoids.
GNU Lesser General Public License v2.1
14 stars 11 forks source link

Use minetest.after, not minetest.register_globalstep #4

Closed tacotexmex closed 6 years ago

tacotexmex commented 7 years ago

Recently learned that the minetest.after function is less CPU intensive than minetest.register_globalstep.

For optimization, the minetest.after approach should be implemented.

(Am I doing it right, @sofar?)

SmallJoker commented 6 years ago

Use minetest.after when it improves the readability of the code. Please see https://github.com/minetest-mods/item_drop/commit/e84433d41ccd4abec1795acbcebe2895bc5be380#commitcomment-29486594

tacotexmex commented 6 years ago

Well did it? 🙂 (…improve the readability of the code?) ¯_(ツ)_/¯

tacotexmex commented 6 years ago

Closing as the issue is accomplished.