Skip to content

Commit 8d187f5

Browse files
committed
Fixed overwatch spoof spam
1 parent 5490bf5 commit 8d187f5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

LabExtended/Utilities/RoleSync.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using LabExtended.API;
22

33
using LabExtended.Events;
4-
using LabExtended.Attributes;
54
using LabExtended.Extensions;
65

76
using LabExtended.Events.Player;
@@ -43,7 +42,7 @@ public static class RoleSync
4342
/// Whether or not the Overwatch spoof should be enabled.
4443
/// <remarks>When enabled, players currently playing as Spectator have a chance of being reported as Overwatch to non-staff players.</remarks>
4544
/// </summary>
46-
public static bool IsOverwatchSpoofEnabled { get; set; } = true;
45+
public static bool IsOverwatchSpoofEnabled { get; set; }
4746

4847
/// <summary>
4948
/// Gets the role which should be sent to a specific player (with a chance of applying the Overwatch spoof).
@@ -150,7 +149,7 @@ internal static void Internal_CheckDirtyRole(ExPlayer player, ExPlayer receiver)
150149
{
151150
using (var writer = NetworkWriterPool.Get())
152151
{
153-
var role = player.Role.GetAppearance(receiver, true);
152+
var role = player.Role.GetAppearance(receiver, false);
154153
var fakedRole = FpcServerPositionDistributor.InvokeRoleSyncEvent(player.ReferenceHub, receiver.ReferenceHub, role, writer);
155154

156155
if (fakedRole.HasValue)
@@ -203,7 +202,7 @@ private static void Internal_Verified(ExPlayer player)
203202
{
204203
spoofWriter.Reset();
205204

206-
var role = p.Role.GetAppearance(player, true);
205+
var role = p.Role.GetAppearance(player, false);
207206
var fakeRole = FpcServerPositionDistributor.InvokeRoleSyncEvent(p.ReferenceHub, player.ReferenceHub, role, spoofWriter);
208207

209208
if (fakeRole.HasValue)

0 commit comments

Comments
 (0)