| 791 | // private |
| 792 | |
| 793 | void afxSelectron::process_client(F32 dt) |
| 794 | { |
| 795 | effect_elapsed += dt; |
| 796 | |
| 797 | U8 pending_state = effect_state; |
| 798 | |
| 799 | // check for state changes |
| 800 | switch (effect_state) |
| 801 | { |
| 802 | case INACTIVE_STATE: |
| 803 | if (marks_mask & MARK_ACTIVATE) |
| 804 | pending_state = ACTIVE_STATE; |
| 805 | break; |
| 806 | case ACTIVE_STATE: |
| 807 | if (marks_mask & MARK_INTERRUPT) |
| 808 | pending_state = CLEANUP_STATE; |
| 809 | else if (marks_mask & MARK_SHUTDOWN) |
| 810 | pending_state = CLEANUP_STATE; |
| 811 | else if (state_expired()) |
| 812 | pending_state = CLEANUP_STATE; |
| 813 | break; |
| 814 | case CLEANUP_STATE: |
| 815 | if (cleanup_over()) |
| 816 | pending_state = DONE_STATE; |
| 817 | break; |
| 818 | } |
| 819 | |
| 820 | if (effect_state != pending_state) |
| 821 | change_state_c(pending_state); |
| 822 | |
| 823 | if (effect_state == INACTIVE_STATE) |
| 824 | return; |
| 825 | |
| 826 | //--------------------------// |
| 827 | |
| 828 | // update the listener constraint position |
| 829 | if (!listener_cons_id.undefined()) |
| 830 | { |
| 831 | Point3F listener_pos; |
| 832 | listener_pos = SFX->getListener().getTransform().getPosition(); |
| 833 | constraint_mgr->setReferencePoint(listener_cons_id, listener_pos); |
| 834 | } |
| 835 | |
| 836 | // update the free target constraint position |
| 837 | if (!free_target_cons_id.undefined()) |
| 838 | { |
| 839 | if (!arcaneFX::sFreeTargetPosValid) |
| 840 | constraint_mgr->invalidateReference(free_target_cons_id); |
| 841 | else |
| 842 | constraint_mgr->setReferencePoint(free_target_cons_id, arcaneFX::sFreeTargetPos); |
| 843 | } |
| 844 | |
| 845 | // find local camera position |
| 846 | Point3F cam_pos; |
| 847 | SceneObject* current_cam = get_camera(&cam_pos); |
| 848 | |
| 849 | // detect camera changes |
| 850 | if (!camera_cons_id.undefined() && current_cam != camera_cons_obj) |
nothing calls this directly
no test coverage detected