by Major Cooke » Sat Dec 17, 2016 6:14 pm
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
Code: Select all
Class BouncyRocket : Actor
{
Default
{
Projectile;
+ALLOWBOUNCEONACTORS
+BOUNCEONACTORS
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}
- Expected behavior:
Bounces off the top.
- Result:
Goes right through though turns around.
Spoiler: Scenario 2
Code: Select all
Class BouncyRocket : Actor
{
Default
{
Projectile;
BounceType "Doom";
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}
- Expected Behavior: Explode on top of D.
- Result: Lands on top, glides across until no longer on top and then continues going down.
Spoiler: Scenario 3
Code: Select all
Class BouncyRocket : Actor
{
Default
{
Projectile;
BounceType "Doom";
-ALLOWBOUNCEONACTORS
-BOUNCEONACTORS
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}
- Expected Result: Explode on actor D.
- Result: Similar to Scenario 2, except it doesn't resume going down. It just goes straight across with no vertical velocity.
[code]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;
}
}
[/code]
BouncyRocket code is different for each scenario to demonstrate relative bugs. Note, for this experiment, just summon D, not BouncyRocket.
[spoiler=Scenario 1][code]Class BouncyRocket : Actor
{
Default
{
Projectile;
+ALLOWBOUNCEONACTORS
+BOUNCEONACTORS
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}[/code]
[list][*][b]Expected behavior:[/b]
Bounces off the top.
[*][b]Result:[/b]
Goes right through though turns around.[/list][/spoiler]
[spoiler=Scenario 2][code]Class BouncyRocket : Actor
{
Default
{
Projectile;
BounceType "Doom";
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}[/code]
[list][*][b]Expected Behavior:[/b] Explode on top of D.
[*][b]Result:[/b] Lands on top, glides across until no longer on top and then continues going down.[/list][/spoiler]
[spoiler=Scenario 3][code]Class BouncyRocket : Actor
{
Default
{
Projectile;
BounceType "Doom";
-ALLOWBOUNCEONACTORS
-BOUNCEONACTORS
+BRIGHT
Radius 4;
Height 4;
BounceFactor 1.0;
Speed 4;
}
States
{
Spawn:
MISL A 1;
Loop;
Death:
MISL B 8 A_Stop();
MISL C 6;
MISL D 4;
Stop;
}
}[/code]
[list][*][b]Expected Result:[/b] Explode on actor D.
[*][b]Result:[/b] Similar to Scenario 2, except it doesn't resume going down. It just goes straight across with no vertical velocity.[/list][/spoiler]