public void CmdTaskFinish(CustomPayload payload) { if (CurrentTask == null) { return; } if (IsHunter && !CurrentTask.HunterActive || !IsHunter && !CurrentTask.VictimActive) { return; } if (!CurrentTask.OnTaskFinish(this, payload.Data)) { return; } if (IsHunter) { CurrentTask.LastHunterOpened = (float)NetworkTime.time; } else { CurrentTask.LastVictimOpened = (float)NetworkTime.time; } TargetSetTaskFinishedClient(connectionToClient, CurrentTask.gameObject); CurrentTask = null; TargetSetTask(connectionToClient, null); }