示例#1
0
        internal void SetDestructibleBlocks(bool destructionEnabled)
        {
            var msg = new ChangeDestructibleBlocksMsg();

            msg.GridEntityId = Entity.EntityId;
            msg.DestructionEnabled = destructionEnabled;

            Sync.Layer.SendMessageToAllAndSelf(ref msg);
        }
示例#2
0
 private static void OnChangeDestructibleBlocks(MySyncGrid syncObject, ref ChangeDestructibleBlocksMsg msg, MyNetworkClient sender)
 {
     syncObject.Entity.DestructibleBlocks = msg.DestructionEnabled;
 }
示例#3
0
 private static void OnChangeDestructibleBlocks(MySyncGrid syncObject, ref ChangeDestructibleBlocksMsg msg, MyNetworkClient sender)
 {
     syncObject.Entity.DestructibleBlocks = msg.DestructionEnabled;
     if (Sync.IsServer)
     {
         Sync.Layer.SendAsRpcToAllButOne(ref msg, sender.SteamUserId);
     }
 }