Beispiel #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);
        }
Beispiel #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);
             }
         }
     }
 }
Beispiel #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);
 }
Beispiel #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);
                    }
                }

            }
        }