Run update callbacks when player visuals change, closes #113

This commit is contained in:
stujones11 2017-08-01 18:48:06 +01:00
parent 43c9984d57
commit 9fa95b2e2c

@ -167,6 +167,7 @@ armor.update_player_visuals = function(self, player)
self.textures[name].wielditem, self.textures[name].wielditem,
}) })
end end
self:run_callbacks("on_update", player)
end end
armor.set_player_armor = function(self, player) armor.set_player_armor = function(self, player)
@ -286,7 +287,6 @@ armor.set_player_armor = function(self, player)
self.def[name].state = state self.def[name].state = state
self.def[name].count = count self.def[name].count = count
self:update_player_visuals(player) self:update_player_visuals(player)
self:run_callbacks("on_update", player)
end end
armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabilities) armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabilities)