예제 #1
0
        public QTempEntityMessage(BinaryReader br)
        {
            ID   = QMessageID.TempEntity;
            Type = (TempEntityType)br.ReadByte();

            switch (Type)
            {
            case TempEntityType.Spike:
            case TempEntityType.SuperSpike:
            case TempEntityType.Gunshot:
            case TempEntityType.Explosion:
            case TempEntityType.TarExplosion:
            case TempEntityType.WizSpike:
            case TempEntityType.KnightSpike:
            case TempEntityType.LavaSplash:
            case TempEntityType.Teleport:
                Origin = QCoords.Read(br);
                return;

            case TempEntityType.Lightning1:
            case TempEntityType.Lightning2:
            case TempEntityType.Lightning3:
            case TempEntityType.Unknown_13:
                Entity      = br.ReadInt16();
                Origin      = QCoords.Read(br);
                TraceEndpos = QCoords.Read(br);
                return;

            case TempEntityType.Unknown_12:
                Origin = QCoords.Read(br);
                Color  = br.ReadByte();
                Range  = br.ReadByte();
                return;
            }
        }
예제 #2
0
        public QSoundMessage(BinaryReader br)
        {
            ID   = QMessageID.Sound;
            Mask = (MessageMask)br.ReadByte();

            if (Mask.HasFlag(MessageMask.Volume))
            {
                Volume = br.ReadByte();
            }
            if (Mask.HasFlag(MessageMask.Attenuation))
            {
                Attenuation = br.ReadByte();
            }
            EntityChan = br.ReadInt16();
            SoundNum   = br.ReadByte();
            Origin     = QCoords.Read(br);
        }
예제 #3
0
        public QSpawnStaticMessage(BinaryReader br)
        {
            ID         = QMessageID.SpawnStatic;
            ModelIndex = br.ReadByte();
            Frame      = br.ReadByte();
            Colormap   = br.ReadByte();
            Skin       = br.ReadByte();
            Origin     = new QCoords();
            Angles     = new QAngles();

            Origin.X = br.ReadCoord();
            Angles.X = br.ReadAngle();
            Origin.Y = br.ReadCoord();
            Angles.Y = br.ReadAngle();
            Origin.Z = br.ReadCoord();
            Angles.Z = br.ReadAngle();
        }
예제 #4
0
        public QSpawnBaselineMessage(BinaryReader br)
        {
            ID         = QMessageID.SpawnBaseline;
            Entity     = br.ReadInt16();
            ModelIndex = br.ReadByte();
            Frame      = br.ReadByte();
            Colormap   = br.ReadByte();
            Skin       = br.ReadByte();
            Origin     = new QCoords();
            Angles     = new QAngles();

            Origin.X = br.ReadCoord();
            Angles.X = br.ReadAngle();
            Origin.Y = br.ReadCoord();
            Angles.Y = br.ReadAngle();
            Origin.Z = br.ReadCoord();
            Angles.Z = br.ReadAngle();
        }
예제 #5
0
파일: Gunshot.cs 프로젝트: lagdotcom/qroute
 public Gunshot(QCoords org) : base(0.1f)
 {
     Origin = org;
 }