Skip to content

Commit

Permalink
Disable kicks based on malformed packets in NetworkEventPatch.cs for …
Browse files Browse the repository at this point in the history
…ControllerMotion
  • Loading branch information
RedBigz committed Dec 26, 2024
1 parent 42d5f72 commit 98876d0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions TABGVR.Server/Patches/NetworkEventPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public static bool Prefix(ServerClient __instance, ServerPackage networkEvent)
return false;
}

if (networkEvent.Buffer.Length !=
sizeof(float) * 3 * 6) // drop malformed packets and kick the responsible player
{
PlayerKickCommand.Run(player,
__instance, KickReason.Invalid);
return false;
}
// if (networkEvent.Buffer.Length !=
// sizeof(float) * 3 * 6) // drop malformed packets and kick the responsible player
// {
// PlayerKickCommand.Run(player,
// __instance, KickReason.Invalid);
// return false;
// }

byte[] message = [player.PlayerIndex, ..networkEvent.Buffer];

Expand Down

0 comments on commit 98876d0

Please sign in to comment.