public override void Parse(ICsvParser parser)
            {
                base.Parse(parser);
                this.ChildRotateLeft             = parser.GetInt();
                this.ChildRotateRight            = parser.GetInt();
                this.ChildParentRelativeRotation = parser.GetShort();
                this.ChildAngleStart             = parser.GetShort();
                this.ChildAngleLength            = parser.GetShort();
                this.ChildCenterDeltaX           = parser.GetShort();
                this.ChildCenterDeltaY           = parser.GetShort();
                this.ChildCenterDeltaZ           = (this.Version >= 27) ? parser.GetShort() : (short)0;
                this.ChildSortAdjust             = parser.GetShort();
                this.ChildDisableWhenParentDead  = (this.Version >= 14) ? parser.GetShort() : (short)0;
                this.ChildDisableWhenParentEmpty = (this.Version >= 38) ? parser.GetShort() : (short)0;
                this.ChildElevationLowAngle      = (this.Version >= 44) ? parser.GetShort() : (short)0;
                this.ChildEelevationHighAngle    = (this.Version >= 44) ? parser.GetShort() : (short)0;
                this.ChildElevationSpeed         = (this.Version >= 44) ? parser.GetShort() : (short)0;
                this.Unknown6D0 = (this.Version >= 44) ? parser.GetQuotedString() : "";
                this.Unknown6E8 = (this.Version >= 44) ? parser.GetQuotedString() : "";
                this.Unknown700 = (this.Version >= 44) ? parser.GetShort() : (short)0;
                this.Unknown702 = (this.Version >= 44) ? parser.GetShort() : (short)0;

                if (this.Version >= 30)
                {
                    this.SpriteOccupied.ParseV3(parser);
                    this.SpriteEmpty.ParseV3(parser);
                    this.SpriteBroken.ParseV3(parser);
                }
                else if (this.Version >= 12)
                {
                    this.SpriteOccupied.ParseV2(parser);
                    this.SpriteEmpty.ParseV2(parser);
                    this.SpriteBroken.ParseV2(parser);
                }
                else
                {
                    this.SpriteOccupied.ParseV1(parser);
                    this.SpriteEmpty.ParseV1(parser);
                    this.SpriteBroken.ParseV1(parser);
                }

                this.SoundRotate = parser.GetInstance <SoundBlob>();

                if (this.Version < 3)
                {
                    this.SpriteOccupied.FixUnknown18();
                    this.SpriteEmpty.FixUnknown18();
                    this.SpriteBroken.FixUnknown18();
                    this.SoundRotate.FixBlobId();
                }


                base.blofiles.Add(SpriteOccupied.BlobName);
                base.blofiles.Add(SpriteEmpty.BlobName);
                base.blofiles.Add(SpriteBroken.BlobName);
                base.blofiles.Add(SoundRotate.BlobName);
            }
Exemplo n.º 2
0
            public override void Parse(ICsvParser parser)
            {
                base.Parse(parser);

                for (int i = 0; i < 16; i++)
                {
                    this.TerrainSpeeds[i].Parse(this.Version, parser);
                }

                this.BouncePercent         = parser.GetShort();
                this.Mode                  = parser.GetShort();
                this.RemoveDeadTimer       = (this.Version >= 2) ? parser.GetShort() : (short)0;
                this.RemoveUnoccupiedTimer = (this.Version >= 2) ? parser.GetShort() : (short)0;
                this.RemoveGlobalTimer     = (this.Version >= 2) ? parser.GetShort() : (short)0;
                this.ThrustOffsetX         = (this.Version >= 5) ? parser.GetShort() : (short)0;
                this.ThrustOffsetY         = (this.Version >= 5) ? parser.GetShort() : (short)0;
                this.ThrustHeight          = (this.Version >= 5) ? parser.GetShort() : (short)0;
                this.ThrustEffectSpeed     = (this.Version >= 43) ? parser.GetShort() : (short)4000;
                this.SmokeCount            = (this.Version >= 5) ? parser.GetShort() : (short)0;
                this.SmokeDelta            = (this.Version >= 5) ? parser.GetShort() : (short)0;
                this.HyperEnergyCost       = (this.Version >= 16) ? parser.GetInt() : 0;
                this.GravityAcceleration   = (this.Version >= 18) ? parser.GetShort() : (short)0;
                this.FloorBouncePercent    = (this.Version >= 18) ? parser.GetShort() : (short)0;
                this.ThrustWhileFlying     = (this.Version >= 20) ? parser.GetShort() : (short)1;
                this.RotateWhileFlying     = (this.Version >= 20) ? parser.GetShort() : (short)1;
                this.CatchLipPercent       = (this.Version >= 28) ? parser.GetShort() : (short)1000;
                this.PortalGravity         = (this.Version >= 40) ? parser.GetShort() : (short)0;
                this.ThrustDelay           = (this.Version >= 41) ? parser.GetShort() : (short)10;
                this.ThrustOffsetDelay     = (this.Version >= 41) ? parser.GetShort() : (short)24;

                if (this.Version >= 30)
                {
                    this.SpriteRoll.ParseV3(parser);
                    this.SpriteEmpty.ParseV3(parser);
                    this.SpriteBroken.ParseV3(parser);
                    this.SpriteThrust.ParseV3(parser);
                    this.SpriteSmoke.ParseV3(parser);
                    this.SpriteStopped.ParseV3(parser);
                }
                else if (this.Version >= 12)
                {
                    this.SpriteRoll.ParseV2(parser);
                    this.SpriteEmpty.ParseV2(parser);
                    this.SpriteBroken.ParseV2(parser);
                    this.SpriteThrust.ParseV2(parser);
                    this.SpriteSmoke.ParseV2(parser);
                    this.SpriteStopped.ParseV2(parser);
                }
                else
                {
                    this.SpriteRoll.ParseV1(parser);
                    this.SpriteEmpty.ParseV1(parser);
                    this.SpriteBroken.ParseV1(parser);
                    this.SpriteThrust.ParseV1(parser);
                    this.SpriteSmoke.ParseV1(parser);
                    this.SpriteStopped.ParseV1(parser);
                }

                if (this.Version >= 30)
                {
                    this.SpriteShadow.ParseV3(parser);
                }
                else if (this.Version >= 19)
                {
                    this.SpriteShadow.ParseV2(parser);
                }

                if (this.Version >= 4)
                {
                    this.SoundDeath = parser.GetInstance <SoundBlob>();
                    base.blofiles.Add(SoundDeath.BlobName);
                }
                else
                {
                    this.SoundDeath = new SoundBlob()
                    {
                        BlobName = "None",
                    };
                }

                if (this.Version < 3)
                {
                    this.SpriteRoll.FixUnknown18();
                    this.SpriteEmpty.FixUnknown18();
                    this.SpriteBroken.FixUnknown18();
                    this.SpriteThrust.FixUnknown18();
                    this.SpriteSmoke.FixUnknown18();
                    this.SpriteStopped.FixUnknown18();
                    this.SoundIdle.FixBlobId();
                    this.SoundThrust.FixBlobId();
                    this.SoundRotate.FixBlobId();
                }

                base.blofiles.Add(SpriteRoll.BlobName);
                base.blofiles.Add(SpriteEmpty.BlobName);
                base.blofiles.Add(SpriteBroken.BlobName);
                base.blofiles.Add(SpriteThrust.BlobName);
                base.blofiles.Add(SpriteSmoke.BlobName);
                base.blofiles.Add(SpriteStopped.BlobName);
                this.SoundIdle   = parser.GetInstance <SoundBlob>();
                this.SoundThrust = parser.GetInstance <SoundBlob>();
                this.SoundRotate = parser.GetInstance <SoundBlob>();
                base.blofiles.Add(SoundIdle.BlobName);
                base.blofiles.Add(SoundThrust.BlobName);
                base.blofiles.Add(SoundRotate.BlobName);
            }