void HandlePlayerMove(Player p, Position next, byte rotX, byte rotY) { if (!RoundInProgress || p.level != Map) { return; } bool reverted = MovementCheck.DetectNoclip(p, next) || MovementCheck.DetectSpeedhack(p, next, Config.MaxMoveDist); if (reverted) { p.cancelmove = true; } }
public override bool HandlesMovement(Player p, ushort x, ushort y, ushort z, byte rotX, byte rotY) { if (!Running || !RoundInProgress) { return(false); } if (p.level == null || !p.level.name.CaselessEq(CurLevelName)) { return(false); } return(MovementCheck.DetectNoclip(p, x, y, z) || MovementCheck.DetectSpeedhack(p, x, y, z, ZombieGameProps.MaxMoveDistance)); }