stujones11 / minetest-3d_armor

Visible player armor & wielded items for minetest
Other
56 stars 98 forks source link

Auto-refresh armor stands after clearobjects. #126

Closed ChimneySwift closed 6 years ago

ChimneySwift commented 6 years ago

Currently armor stands appear empty after a clearobjects, in order to refresh them the armor must be removed and put back on again, this code automatically refreshes armor stands periodically to avoid these issues.

stujones11 commented 6 years ago

Looks good, thanks.

Desour commented 6 years ago

This could be made more performant by checking active_object_count > 0 first. (active_object_count is the number of how many objects are in the mapblock of the node.) This could be better for the case that there's no object in the mapblock. minetest.get_objects_inside_radius is heavy since it checks all active objects.