public void SendChangeSensorMaxRequest(ref Vector3 fieldMax) { var msg = new ChangeMySensorMaxMsg(); msg.EntityId = m_block.EntityId; msg.FieldMax = fieldMax; Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); }
static void ChangeSensorMaxSuccess(ref ChangeMySensorMaxMsg msg, MyNetworkClient sender) { MyEntity entity; MyEntities.TryGetEntityById(msg.EntityId, out entity); var block = entity as MySensorBlock; if (block != null) { block.FieldMax = msg.FieldMax; } }
static void ChangeSensorMaxRequest(ref ChangeMySensorMaxMsg msg, MyNetworkClient sender) { MyEntity entity; MyEntities.TryGetEntityById(msg.EntityId, out entity); var block = entity as MySensorBlock; if (block != null) { block.FieldMax = msg.FieldMax; Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success); } }
static void ChangeSensorMaxRequest(ref ChangeMySensorMaxMsg msg, MyNetworkClient sender) { MyEntity entity; MyEntities.TryGetEntityById(msg.EntityId, out entity); var block = entity as MySensorBlock; if (block != null) { block.FieldMax = msg.FieldMax; Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId,MyTransportMessageEnum.Success); } }