コード例 #1
0
        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);
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 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);
 }
コード例 #4
0
        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);
            }
        }