Exemplo n.º 1
0
        public static void MissileLockonMessage(NetConnection c, ushort shipID, LockonStatus status)
        {
            var msg = Network.Server.CreateMessage();

            msg.Write((byte)NetMsgType.Lockon);
            msg.Write(shipID);
            msg.Write((byte)status);
            Network.Server.SendMessage(msg, c, NetDeliveryMethod.ReliableUnordered);
        }
Exemplo n.º 2
0
 void SendMissileLockon(LockonStatus status)
 {
     if (Client != null)
     {
         NetOutgoingMessage msg = Network.Server.CreateMessage();
         if (Target == null)
         {
             MessageWriter.MissileLockonMessage(Client.Owner, ushort.MaxValue, LockonStatus.NotLocked);
         }
         else
         {
             MessageWriter.MissileLockonMessage(Client.Owner, Target.ID, status);
             if (status != LockonStatus.NotLocked)
             {
                 MessageWriter.MissileLockonMessage(Target.Client.Owner, 0, LockonStatus.EnemyLock);
             }
             else
             {
                 MessageWriter.MissileLockonMessage(Target.Client.Owner, 0, LockonStatus.MissileDestroyed);
             }
         }
     }
 }
Exemplo n.º 3
0
 public static void MissileLockonMessage(NetConnection c, ushort shipID, LockonStatus status)
 {
     var msg = Network.Server.CreateMessage();
     msg.Write((byte)NetMsgType.Lockon);
     msg.Write(shipID);
     msg.Write((byte)status);
     Network.Server.SendMessage(msg, c, NetDeliveryMethod.ReliableUnordered);
 }
Exemplo n.º 4
0
        void SendMissileLockon(LockonStatus status)
        {
            if (Client != null)
            {
                NetOutgoingMessage msg = Network.Server.CreateMessage();
                if (Target == null)
                {
                    MessageWriter.MissileLockonMessage(Client.Owner, ushort.MaxValue, LockonStatus.NotLocked);
                }
                else
                {
                    MessageWriter.MissileLockonMessage(Client.Owner, Target.ID, status);
                    if (status != LockonStatus.NotLocked)
                    {
                        MessageWriter.MissileLockonMessage(Target.Client.Owner, 0, LockonStatus.EnemyLock);
                    }
                    else
                    {
                        MessageWriter.MissileLockonMessage(Target.Client.Owner, 0, LockonStatus.MissileDestroyed);
                    }
                }

            }
        }