static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender)
 {
     MyUserControllableGun block = null;
     MyEntities.TryGetEntityById(msg.EntityId, out block);
     if (block != null)
     {
         block.BeginShoot();
     }
 }
Beispiel #2
0
        public void SendBeginShootMessage()
        {
            m_block.SyncRotationAndOrientation();
            m_block.BeginShoot();
            var msg = new BeginShootMessage();

            msg.EntityId = m_block.EntityId;
            Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Success);
        }
        static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender)
        {
            MyUserControllableGun block = null;

            MyEntities.TryGetEntityById(msg.EntityId, out block);
            if (block != null)
            {
                block.BeginShoot();
            }
        }
 static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender)
 {
     MyUserControllableGun block = null;
     MyEntities.TryGetEntityById(msg.EntityId, out block);
     if (block != null)
     {
         block.BeginShoot();
         if (Sync.IsServer)
         {
             Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
         }
     }
 }
Beispiel #5
0
        static void BeginShootSuccess(ref BeginShootMessage msg, MyNetworkClient sender)
        {
            MyUserControllableGun block = null;

            MyEntities.TryGetEntityById(msg.EntityId, out block);
            if (block != null)
            {
                block.BeginShoot();
                if (Sync.IsServer)
                {
                    Sync.Layer.SendMessageToAllButOne(ref msg, sender.SteamUserId, MyTransportMessageEnum.Success);
                }
            }
        }
 public void SendBeginShootMessage()
 {
     m_block.SyncRotationAndOrientation();
     m_block.BeginShoot();
     var msg = new BeginShootMessage();
     msg.EntityId = m_block.EntityId;
     Sync.Layer.SendMessageToServer(ref msg, MyTransportMessageEnum.Success);
 }