Skip to content

Commit

Permalink
Smol change to prevent plugins from borking everything
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-119 committed May 9, 2023
1 parent 13c5618 commit bd38282
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Exiled.API/Extensions/MirrorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ public static void MessageTranslated(this Player player, string words, string tr
/// <param name="value">Value of send to target.</param>
public static void SendFakeSyncVar(this Player target, NetworkIdentity behaviorOwner, Type targetType, string propertyName, object value)
{
Log.Warn($"{Assembly.GetCallingAssembly().GetName().Name} tried to send a fake syncvar. This is currently broken. This warning does not indicate an error, but expect something to not work as intended.");
/*
void CustomSyncVarGenerator(NetworkWriter targetWriter)
{
targetWriter.WriteULong(SyncVarDirtyBits[propertyName]);
Expand All @@ -298,6 +300,7 @@ void CustomSyncVarGenerator(NetworkWriter targetWriter)
target.ReferenceHub.networkIdentity.connectionToClient.Send(writer.ToArraySegment());
NetworkWriterPool.Return(writer);
NetworkWriterPool.Return(writer2);
*/
}

/// <summary>
Expand All @@ -318,6 +321,8 @@ void CustomSyncVarGenerator(NetworkWriter targetWriter)
/// <param name="values">Values of send to target.</param>
public static void SendFakeTargetRpc(Player target, NetworkIdentity behaviorOwner, Type targetType, string rpcName, params object[] values)
{
Log.Warn($"{Assembly.GetCallingAssembly().GetName().Name} has tried to send a fake RPC. This is currently broken. This warning does not indicate an error, but expect something to not be working as intended.");
/*
NetworkWriterPooled writer = NetworkWriterPool.Get();
foreach (object value in values)
Expand All @@ -334,6 +339,7 @@ public static void SendFakeTargetRpc(Player target, NetworkIdentity behaviorOwne
target.Connection.Send(msg, 0);
NetworkWriterPool.Return(writer);
*/
}

/// <summary>
Expand Down

0 comments on commit bd38282

Please sign in to comment.