mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
just use ex
This commit is contained in:
1 parent
e961e2c4b0
commit
be19a198e3
8 files changed
+27
-17
No files matched your search
@@ -333,7 +333,7 @@ class AntiCheat
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,9 +534,9 @@ class AntiCheat
|
||||
bool IsImpostor = player.IsImpostorTeam();
|
||||
bool IsCrewmate = !player.IsImpostorTeam();
|
||||
|
||||
if (TrustedRPCs(callId) != true)
|
||||
if (TrustedRPCs(callId) != true && !player.IsHost())
|
||||
{
|
||||
BetterNotificationManager.NotifyCheat(player, $"Untrusted RPC received: {callId}");
|
||||
BetterNotificationManager.NotifyCheat(player, $"Unregistered RPC received: {callId}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ class AntiCheat
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ class BetterDataManager
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
@@ -461,7 +461,7 @@ class BetterDataManager
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -45,7 +45,7 @@ class LateTask
|
||||
catch (Exception ex)
|
||||
{
|
||||
TasksToRemove.Add(task);
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
}
|
||||
}
|
||||
TasksToRemove.ForEach(task => Tasks.Remove(task));
|
||||
|
||||
@@ -153,6 +153,14 @@ internal static class RPC
|
||||
{
|
||||
if (player == null || player.IsLocalPlayer() || player.Data == null) return;
|
||||
|
||||
var flag = Enum.IsDefined(typeof(CustomRPC), (int)unchecked(callId)) || Enum.IsDefined(typeof(RpcCalls), callId);
|
||||
|
||||
if (!flag && player.IsHost())
|
||||
{
|
||||
var BAU = "<color=#278720>♻</color><color=#0ed400><b>BetterAmongUs</b></color><color=#278720>♻</color>";
|
||||
Utils.DisconnectSelf($"{BAU} does not support\n<b>Modded Lobbies</b>!");
|
||||
}
|
||||
|
||||
if (!Enum.IsDefined(typeof(CustomRPC), (int)unchecked(callId))) return;
|
||||
|
||||
MessageReader reader = MessageReader.Get(oldReader);
|
||||
@@ -196,6 +204,7 @@ internal static class RPC
|
||||
SyncAllNames(force: true);
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case (byte)CustomRPC.VersionCheck or (byte)CustomRPC.RequestRetryVersionCheck:
|
||||
if (player.IsHost())
|
||||
{
|
||||
@@ -204,6 +213,7 @@ internal static class RPC
|
||||
Utils.DisconnectSelf($"{BAU} does not support <color=#ff9cdc><b>TOHE</b></color>");
|
||||
}
|
||||
break;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ public static class Utils
|
||||
catch (Exception ex)
|
||||
{
|
||||
chat.chatBubblePool.Reclaim(pooledBubble);
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ public static class Utils
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -241,7 +241,7 @@ public static class Utils
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ class PlayerControlPatch
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Error(ex.ToString());
|
||||
Logger.Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,14 +33,13 @@ class SplashIntroPatch
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Mouse0) || Input.GetKeyDown(KeyCode.Mouse1))
|
||||
{
|
||||
if (ShowTime > 2.5f)
|
||||
if (ShowTime > 2.5f && !IsReallyDoneLoading)
|
||||
{
|
||||
__instance.StopAllCoroutines();
|
||||
__instance.sceneChanger.BeginLoadingScene();
|
||||
__instance.doneLoadingRefdata = true;
|
||||
IsReallyDoneLoading = true;
|
||||
__instance.sceneChanger.AllowFinishLoadingScene();
|
||||
__instance.startedSceneLoad = true;
|
||||
__instance.sceneChanger.BeginLoadingScene();
|
||||
__instance.sceneChanger.AllowFinishLoadingScene();
|
||||
__instance.logoAnimFinish.gameObject.SetActive(false);
|
||||
__instance.loadingObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
@@ -58,6 +57,7 @@ class SplashIntroPatch
|
||||
BetterLogo.name = "BetterLogo";
|
||||
BetterLogo.GetComponent<SpriteRenderer>().sprite = Utils.LoadSprite("BetterAmongUs.Resources.Images.BetterAmongUs-Logo.png", 150f);
|
||||
__instance.logoAnimFinish.transform.Find("BlackOverlay").transform.SetLocalY(0f);
|
||||
__instance.loadingObject.SetActive(false);
|
||||
}
|
||||
|
||||
__instance.startedSceneLoad = BetterIntro;
|
||||
|
||||
Reference in new issue
Block a user