| 3936 | } |
| 3937 | |
| 3938 | void Lance::DoFrame(int me) { |
| 3939 | float frame; |
| 3940 | |
| 3941 | Obj_WBValue(me, 0, VF_GET, WBV_F_ANIM_FRAME, &frame); |
| 3942 | |
| 3943 | if (frame > 2.0f && frame < 6.0f) { |
| 3944 | if (memory->mode == LANCE_MOVING) { |
| 3945 | int flags = AIF_DISABLE_FIRING; |
| 3946 | AI_Value(me, VF_SET_FLAGS, AIV_I_FLAGS, &flags); |
| 3947 | memory->mode = LANCE_PAUSED; |
| 3948 | } |
| 3949 | } else if (memory->mode == LANCE_PAUSED) { |
| 3950 | int flags = AIF_DISABLE_FIRING; |
| 3951 | AI_Value(me, VF_CLEAR_FLAGS, AIV_I_FLAGS, &flags); |
| 3952 | memory->mode = LANCE_MOVING; |
| 3953 | } |
| 3954 | } |
| 3955 | |
| 3956 | int16_t Lance::CallEvent(int event, tOSIRISEventInfo *data) { |
| 3957 | switch (event) { |
nothing calls this directly
no test coverage detected