Railgun - no decal

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
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Railgun - no decal

Post by Enjay »

3.7.1 Official and gzdoom-g3.8pre-232-g395d61391

I *think* this is a bug rather than merely a scripting error.

If I use a railgun and give its puff a decal, the decal does not appear when shooting a wall. However, if I use the same puff on a different style of hitscan weapon, the decal will appear.

e.g. with this puff:

Code: Select all

class NJTestPuff : BulletPuff
{
	Default
	{
		DamageType "Extreme";
		RenderStyle "None";
		Decal "BFGScorch";
	}
}
A railgun like this

Code: Select all

A_RailAttack(100,0,1,"68 B1 CC","FF FF FF",0,0,"NJTestPuff");
does not leave a decal but this gun

Code: Select all

A_FireBullets(4,1,14,4,"NJTestPuff",1,3200);
does.

Test file attached.

Use the console to give njtestgun1 (railgun-plasmagun) and fire at a wall. Should be no decal.

Use the console to give njtestgun2 (shotgun-plasmagun thing) and fire at a wall. BFG scorches everywhere.
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: Railgun - no decal

Post by Graf Zahl »

This bug's on your side. To work with the railgun attack the puff needs the FORCEDECAL flag, otherwise it will pick the attack source's decal, i.e. the attacking monster or weapon's.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Railgun - no decal

Post by Enjay »

Like this?

Code: Select all

class NJTestPuff : BulletPuff
{
	Default
	{
		+FORCEDECAL
		DamageType "Extreme";
		RenderStyle "None";
		Decal "BFGScorch";
	}
}
Still no decal from the railgun. I also tried adding +FORCEDECAL to the weapon and still no decal (although putting the decal on the weapon rather than the puff does allow the weapon to leave a decal).
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: Railgun - no decal

Post by Graf Zahl »

Well...

The code wasn't quite right here, it was all copied over from P_LineAttack but missed one crucial difference: Unlike a normal hitscan, the rail attack only spawns the actual puff if the ALWAYSPUFF flag is set - and then took the decal info from the puff actor instead of the class defaults. So specifying a puff that wasn't spawned also ignored the decal attached to it - which was clearly unintended.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Railgun - no decal

Post by Enjay »

Thanks for the explanation. With the rail having that different puff handling, I can easily see how the decal situation was missed.
Post Reply

Return to “Closed Bugs [GZDoom]”