private static void OnSetInstantBuilding(ref SetInstantBuildingMsg msg, MyNetworkClient sender) { MyEntity projectorEntity; MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity); var projector = projectorEntity as MyProjector; if (projector != null) { projector.OnSetInstantBuilding(msg.Enabled); } }
private static void OnSetInstantBuilding(ref SetInstantBuildingMsg msg, MyNetworkClient sender) { MyEntity projectorEntity; MyEntities.TryGetEntityById(msg.EntityId, out projectorEntity); var projector = projectorEntity as MyProjector; if (projector != null) { projector.OnSetInstantBuilding(msg.Enabled); if (Sync.IsServer) { Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId); } } }
public void SendNewInstantBuilding(bool instantBuilding) { var msg = new SetInstantBuildingMsg(); msg.EntityId = m_projector.EntityId; msg.Enabled = instantBuilding; Sync.Layer.SendMessageToAllAndSelf(ref msg); }
public void SendNewInstantBuilding(bool instantBuilding) { var msg = new SetInstantBuildingMsg(); msg.EntityId = m_projector.EntityId; msg.Enabled = instantBuilding; Sync.Layer.SendMessageToServerAndSelf(ref msg,MyTransportMessageEnum.Request); }