Beispiel #1
0
 public static Order MakeMouseClick(ImmutableList<UInt16> selected, Vector point) {
     return new Order() {
         OrderType = 1,
         SelectedUnits = selected,
         PreparedOrderPoint = point
     };
 }
Beispiel #2
0
 public static Order MakeAbilityUpgrade(Vector heroOrigin, UInt16 abilityEntIndex) {
     return new Order() {
         OrderType = 0xb,
         BaseNpcHandle = abilityEntIndex,
     };
 }
Beispiel #3
0
        public Vector CrosshairTrace { get; set; } // 0x9c

        public UserCmd() {
            ViewAngles = new Vector();
            HeadAngles = new Vector();
            HeadOffset = new Vector();
            CrosshairTrace = new Vector();
        }
Beispiel #4
0
        public void WriteBitVec3Coord(Vector v) {
            bool x = (v.X <= -COORD_RESOLUTION) || (COORD_RESOLUTION <= v.X);
            bool y = (v.Y <= -COORD_RESOLUTION) || (COORD_RESOLUTION <= v.Y);
            bool z = (v.Z <= -COORD_RESOLUTION) || (COORD_RESOLUTION <= v.Z);

            WriteBool(x);
            WriteBool(y);
            WriteBool(z);

            if (x) {
                WriteBitCoord(v.X);
            }

            if (y) {
                WriteBitCoord(v.Y);
            }

            if (z) {
                WriteBitCoord(v.Z);
            }
        }