internal void SetDestructibleBlocks(bool destructionEnabled) { var msg = new ChangeDestructibleBlocksMsg(); msg.GridEntityId = Entity.EntityId; msg.DestructionEnabled = destructionEnabled; Sync.Layer.SendMessageToAllAndSelf(ref msg); }
private static void OnChangeDestructibleBlocks(MySyncGrid syncObject, ref ChangeDestructibleBlocksMsg msg, MyNetworkClient sender) { syncObject.Entity.DestructibleBlocks = msg.DestructionEnabled; }
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); } }