public void SendAutoLockChange(bool autoLock) { var msg = new AutoLockMsg(); msg.EntityId = m_landingGear.EntityId; msg.AutoLock = autoLock; Sync.Layer.SendMessageToServer(ref msg); }
static void OnAutoLockChange(ref AutoLockMsg msg, MyNetworkClient sender) { MyLandingGear gear; if (MyEntities.TryGetEntityById <MyLandingGear>(msg.EntityId, out gear)) { gear.AutoLock = msg.AutoLock; if (Sync.IsServer) { Sync.Layer.SendMessageToAll(ref msg); } } }
static void OnAutoLockChange(ref AutoLockMsg msg, MyNetworkClient sender) { MyLandingGear gear; if (MyEntities.TryGetEntityById<MyLandingGear>(msg.EntityId, out gear)) { gear.AutoLock = msg.AutoLock; if (Sync.IsServer) Sync.Layer.SendMessageToAll(ref msg); } }