[Since ZScript] Bouncing bugginess

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

[Since ZScript] Bouncing bugginess

Post by Major Cooke »

Code: Select all

Class D : Actor
{
	Actor rr;
	Default
	{
		Monster;
		-COUNTKILL
		+NODAMAGE
		+NOPAIN
		+DONTTHRUST
		Radius 32;
		Height 56;
	}
	States
	{
	Spawn:
		PLAY A 1 NoDelay
		{
			if (A_CheckFloor("Null"))
			{
				Vector3 rocketpos = Vec3Angle(0, angle, height + 12);
				rr = Spawn("BouncyRocket",rocketpos);
				if (rr)
				{
					let br = BouncyRocket(rr);
					if (br)
					{
						br.angle = angle;
						br.A_ChangeVelocity(1,0,-4,CVF_REPLACE);
						return ResolveState(1);
					}
				}
				Destroy();
			}
			return ResolveState(null);
		}
		Wait;
		PLAY A 1
		{
			if (!rr)	Destroy();
		}
		Wait;
	}
}
BouncyRocket code is different for each scenario to demonstrate relative bugs. Note, for this experiment, just summon D, not BouncyRocket.
Spoiler: Scenario 1
Spoiler: Scenario 2
Spoiler: Scenario 3
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [Since ZScript] Bouncing bugginess

Post by Major Cooke »

Ugh. Wish I could find the commit where this changed but I will say it was during one of the refactors. I saw something about the onmobj flag, I think. Still searching for it...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Since ZScript] Bouncing bugginess

Post by Graf Zahl »

Sadly these tests are perfectly useless because I cannot go back far enough in commit history to test them on pre-ZScript versions. All I can see is that they do not work, but it's impossible to find out when this broke.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [Since ZScript] Bouncing bugginess

Post by Major Cooke »

Ugh, damn it all to hell. Welp! Looks like I'm going to be pulling in the bounce states for use after all... This is gonna suck.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Since ZScript] Bouncing bugginess

Post by Graf Zahl »

This cost me quite a bit of time to figure out:

You forgot to set a bounce type. Bouncing missiles require the CANPASS flag, but nothing in your definition sets it, it either needs to be done explicitly or by specifying a bounce type.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [Since ZScript] Bouncing bugginess

Post by Major Cooke »

Scenario 2 and 3 has a bounce type. But, shouldn't Projectile; do that CANPASS business?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [Since ZScript] Bouncing bugginess

Post by Graf Zahl »

No. The problem is in the bouncing code, it needs that flag or it won't work.

The rest of this problem is the same issue as the other one I closed a few hours ago. This is not something that's easily fixed because the logic is so screwed up.
Post Reply

Return to “Closed Bugs [GZDoom]”