Refactored updating hitboxes