static void StopManipulationCallback(ref StopManipulationMsg msg, MyNetworkClient sender)
 {
     MyManipulationTool manipulationTool;
     if (MyEntities.TryGetEntityById(msg.EntityId, out manipulationTool))
     {
         manipulationTool.StopManipulation();
     }
 }
        static void StopManipulationCallback(ref StopManipulationMsg msg, MyNetworkClient sender)
        {
            MyManipulationTool manipulationTool;

            if (MyEntities.TryGetEntityById(msg.EntityId, out manipulationTool))
            {
                manipulationTool.StopManipulation();
            }
        }
Exemple #3
0
        static void StopManipulationCallback(ref StopManipulationMsg msg, MyNetworkClient sender)
        {
            MyManipulationTool manipulationTool;

            if (MyEntities.TryGetEntityById(msg.EntityId, out manipulationTool))
            {
                if (Sync.IsServer)
                {
                    Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
                }
                manipulationTool.StopManipulation();
            }
        }
        public void StopManipulation()
        {
            MyManipulationTool manipulationTool;
            if (MyEntities.TryGetEntityById(m_entityId, out manipulationTool))
            {
                manipulationTool.StopManipulation();
            }
         
            StopManipulationMsg msg = new StopManipulationMsg();
            msg.EntityId = m_entityId;

            MySession.Static.SyncLayer.SendMessageToAll(ref msg);
        }
Exemple #5
0
        public void StopManipulation()
        {
            MyManipulationTool manipulationTool;

            if (MyEntities.TryGetEntityById(m_entityId, out manipulationTool))
            {
                manipulationTool.StopManipulation();
            }

            StopManipulationMsg msg = new StopManipulationMsg();

            msg.EntityId = m_entityId;

            MySession.Static.SyncLayer.SendMessageToServer(ref msg);
        }
Exemple #6
0
        public void StopManipulation()
        {
            // Can be called from Client!
            // Stop manipulation immediately (to avoid sending StopMAnipulation again and again form clients)
            MyManipulationTool manipulationTool;

            if (MyEntities.TryGetEntityById(m_entityId, out manipulationTool))
            {
                manipulationTool.StopManipulation();
            }

            StopManipulationMsg msg = new StopManipulationMsg();

            msg.EntityId = m_entityId;

            if (Sync.IsServer)
            {
                MySession.Static.SyncLayer.SendMessageToAll(ref msg);
            }
            else
            {
                MySession.Static.SyncLayer.SendMessageToServer(ref msg);
            }
        }
 static void StopManipulationCallback(ref StopManipulationMsg msg, MyNetworkClient sender)
 {
     MyManipulationTool manipulationTool;
     if (MyEntities.TryGetEntityById(msg.EntityId, out manipulationTool))
     {
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId);
         }
         manipulationTool.StopManipulation();
     }
 }