private void pauseRPC(bool pause, PhotonMessageInfo info = null) { if (info != null && !info.Sender.IsMasterClient) { Log.AddLine("RPCerror", MsgType.Error, info.Sender.ID.ToString(), nameof(pauseRPC)); AntisManager.Response(info.Sender.ID, true, string.Empty); return; } if (pause) { AnarchyManager.PauseWindow.PauseWaitTime = 100000f; UnityEngine.Time.timeScale = 0.00001f; if (!AnarchyManager.PauseWindow.IsActive) { AnarchyManager.PauseWindow.EnableImmediate(); } } else { AnarchyManager.PauseWindow.PauseWaitTime = 3f; } }
private void clearlevel(string[] link, int gametype, PhotonMessageInfo info) { if (info != null && !info.Sender.IsMasterClient) { Log.AddLine("RPCerror", MsgType.Error, info.Sender.ID.ToString(), nameof(clearlevel)); AntisManager.Response(info.Sender.ID, true, string.Empty); return; } switch (gametype) { case 0: IN_GAME_MAIN_CAMERA.GameMode = GameMode.KillTitan; if (!(logic is KillTitanLogic)) { logic = new KillTitanLogic(logic); } break; case 1: IN_GAME_MAIN_CAMERA.GameMode = GameMode.SurviveMode; if (!(logic is SurviveLogic)) { logic = new SurviveLogic(logic); } break; case 2: IN_GAME_MAIN_CAMERA.GameMode = GameMode.PvpAhss; if (!(logic is PVPLogic)) { logic = new PVPLogic(logic); } break; case 3: IN_GAME_MAIN_CAMERA.GameMode = GameMode.Racing; if (!(logic is RacingLogic)) { logic = new RacingLogic(logic); } break; default: case 4: IN_GAME_MAIN_CAMERA.GameMode = GameMode.None; if (logic == null || logic.GetType() != typeof(GameLogic.GameLogic)) { logic = new GameLogic.GameLogic(logic); } break; } if (SkinSettings.CustomSkins.Value != 1) { return; } CustomLevel.LoadSkin(link, info); }