Restores the target's movement
| 4921 | |
| 4922 | // Restores the target's movement |
| 4923 | void Lifter::ReleaseTarget(int me) { |
| 4924 | // Make sure we still have a target |
| 4925 | if (memory->pull_target != OBJECT_HANDLE_NONE && qObjExists(memory->pull_target)) { |
| 4926 | // Check the type |
| 4927 | int type; |
| 4928 | Obj_Value(memory->pull_target, VF_GET, OBJV_I_TYPE, &type); |
| 4929 | if (type == OBJ_PLAYER) { |
| 4930 | aTogglePlayerObjControl(1, PLAYER_CONTROL_MASK, memory->pull_target); |
| 4931 | } |
| 4932 | } |
| 4933 | |
| 4934 | // Release the pull target |
| 4935 | memory->pull_target = OBJECT_HANDLE_NONE; |
| 4936 | |
| 4937 | // Set the next pull check time for a nice delay |
| 4938 | memory->next_pull_check_time = |
| 4939 | Game_GetTime() + LIFTER_NEXT_PULL_DELAY + (((float)rand() / (float)D3_RAND_MAX) * LIFTER_NEXT_PULL_VARIANCE); |
| 4940 | |
| 4941 | mprintf(0, "Target released.\n"); |
| 4942 | } |
| 4943 | |
| 4944 | // Stops pulling and returns to hostile mode |
| 4945 | void Lifter::StopPulling(int me) { |
nothing calls this directly
no test coverage detected