Moves the event manager processing into the process itself. Ensures the last_object var is properly set in case of issues. Also fixes a potential risk of the camera damage event looping forever.