static void OnSetCurrentPosition(MySyncPistonBase sync, ref CurrentPositionMsg msg, MyNetworkClient sender)
        {
            var grid = sync.Entity.CubeGrid;

            if (grid.Physics == null || grid.MarkedForClose || sync.Entity.MarkedForClose)
            {
                return;
            }
            sync.SyncPosition(msg.CurrentPosition);
        }
        static void OnSetCurrentPosition(MySyncPistonBase sync, ref CurrentPositionMsg msg, MyNetworkClient sender)
        {
            var grid = sync.Entity.CubeGrid;

            if (grid.Physics == null || grid.MarkedForClose || sync.Entity.MarkedForClose)
            {
                return;
            }
            sync.SyncPosition(msg.CurrentPosition);

            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
            }
        }
 static void OnSetCurrentPosition(MySyncPistonBase sync, ref CurrentPositionMsg msg, MyNetworkClient sender)
 {
     var grid = sync.Entity.CubeGrid;
     if (grid.Physics == null || grid.MarkedForClose || sync.Entity.MarkedForClose)
         return;
     sync.SyncPosition(msg.CurrentPosition);
 }
        static void OnSetCurrentPosition(MySyncPistonBase sync, ref CurrentPositionMsg msg, MyNetworkClient sender)
        {
            var grid = sync.Entity.CubeGrid;
            if (grid.Physics == null || grid.MarkedForClose || sync.Entity.MarkedForClose)
                return;
            sync.SyncPosition(msg.CurrentPosition);

            if (Sync.IsServer)
            {
                Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
            }
        }