Ejemplo n.º 1
0
        // This rotates the thing

        /*public void Rotate(float newangle)
         * {
         *      BeforePropsChange();
         *
         *      // Change angle
         *      this.anglerad = newangle;
         *      //this.anglebuild = Angle2D.RealToBuild(newangle);
         *
         *      General.Map.IsChanged = true;
         * }*/

        // This rotates the thing

        /*public void Rotate(int newangle)
         * {
         *      BeforePropsChange();
         *
         *      // Change angle
         *      this.anglerad = Angle2D.DegToRad(newangle);
         *      //this.anglebuild = newangle;
         *
         *      General.Map.IsChanged = true;
         * }*/

        // This updates all properties
        // NOTE: This does not update sector! (call DetermineSector)
        internal void Update(BuildSprite src)
        {
            // Apply changes
            this.flags        = new Dictionary <string, bool>(src.Flags, StringComparer.Ordinal);
            this.tileindex    = src.TileIndex;
            this.shade        = src.Shade;
            this.paletteindex = src.PaletteIndex;

            this.clipdistance = src.ClipDistance;
            this.repeatx      = src.RepeatX;
            this.repeaty      = src.RepeatY;
            this.offsetx      = src.OffsetX;
            this.offsety      = src.OffsetY;
            this.status       = src.Status;
            this.anglerad     = Angle2D.BuildToRad(src.Angle);

            this.owner    = src.Owner;
            this.Velocity = new Vector3D(src.VelX, src.VelY, src.VelZ);

            this.hitag = src.HiTag;
            this.lotag = src.LoTag;
            this.extra = src.Extra;

            this.Move(src.X, src.Y, src.Z);
            this.sector = src.Sector;
        }