mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
Revert vent changes
This commit is contained in:
1 parent
a6b4cdf95f
commit
8444befca4
4 files changed
+14
-42
No files matched your search
@@ -253,20 +253,21 @@ internal static class PlayerControlHelper
|
||||
if (player == null)
|
||||
return false;
|
||||
|
||||
if (player.IsLocalPlayer())
|
||||
{
|
||||
return player.inVent || player.walkingToVent;
|
||||
}
|
||||
else
|
||||
{
|
||||
var extendedData = player.ExtendedData();
|
||||
if (extendedData != null)
|
||||
{
|
||||
return extendedData.GameplayInfo.InVent;
|
||||
}
|
||||
}
|
||||
if (player.inVent)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
if (player.walkingToVent && !player.moveable)
|
||||
return true;
|
||||
|
||||
var physics = player.MyPhysics;
|
||||
if (physics == null)
|
||||
return false;
|
||||
|
||||
var animations = physics.Animations;
|
||||
if (animations == null)
|
||||
return false;
|
||||
|
||||
return animations.IsPlayingEnterVentAnimation();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,7 +2,6 @@ using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Mono.Extended;
|
||||
using Hazel;
|
||||
|
||||
namespace BetterAmongUs.Modules.AntiCheat.RPCHandlers;
|
||||
@@ -22,9 +21,4 @@ internal sealed class EnterVentHandler : RPCHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Handle(PlayerControl? sender, MessageReader reader)
|
||||
{
|
||||
sender.ExtendedData().GameplayInfo.InVent = true;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ using AmongUs.GameOptions;
|
||||
using BetterAmongUs.Attributes;
|
||||
using BetterAmongUs.Helpers;
|
||||
using BetterAmongUs.Managers;
|
||||
using BetterAmongUs.Mono.Extended;
|
||||
using Hazel;
|
||||
|
||||
namespace BetterAmongUs.Modules.AntiCheat.RPCHandlers;
|
||||
@@ -22,9 +21,4 @@ internal sealed class ExitVentHandler : RPCHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Handle(PlayerControl? sender, MessageReader reader)
|
||||
{
|
||||
sender.ExtendedData().GameplayInfo.InVent = false;
|
||||
}
|
||||
}
|
||||
@@ -151,12 +151,6 @@ internal sealed class ExtendedPlayerInfo : MonoBehaviour, IMonoExtension<Network
|
||||
/// </summary>
|
||||
[HideFromIl2Cpp]
|
||||
internal ExtendedAntiCheatInfo? AntiCheatInfo { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets extended gameplay information.
|
||||
/// </summary>
|
||||
[HideFromIl2Cpp]
|
||||
internal ExtendedGameplayInfo? GameplayInfo { get; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -246,17 +240,6 @@ internal sealed class ExtendedRoleInfo
|
||||
internal RoleTypes DeadDisplayRole { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the gameplay information for a player.
|
||||
/// </summary>
|
||||
internal sealed class ExtendedGameplayInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the player is currently in a vent.
|
||||
/// </summary>
|
||||
internal bool InVent { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for accessing extended player data.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user