A tiny fix for decals from bouncing projectiles.

This commit is contained in:
Mari the Deer 2022-09-15 14:05:21 +02:00
commit dda1c7f072
5 changed files with 13 additions and 4 deletions

View file

@ -208,11 +208,11 @@ extend Class MisterRifle
DrawWindowFrame(200-fw/2,72+8,fw,fh);
if ( gchambered )
{
TouchScreen.DrawTexture(MortalIcons[1],false,200-fw/2,72+8,DTA_SrcY,gfired*32,DTA_SrcHeight,32,DTA_DestHeight,32);
TouchScreen.DrawTexture(MortalIcons[1],false,200-fw/2,72+8,DTA_SrcY,gfired*32,DTA_SrcHeight,32,DTA_DestHeight,32,DTA_ColorOverlay,gfired?0x80000000:0x00000000);
if ( grenadeflash && (gametic < grenadeflash) )
{
double alph = clamp((grenadeflash-(gametic+e.fractic))/15.,0.,1.)**2.;
TouchScreen.DrawTexture(MortalIcons[1],false,200-fw/2,72+8,DTA_SrcY,gfired*32,DTA_SrcHeight,32,DTA_DestHeight,32,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_AddStencil,DTA_FillColor,0xFFFFFFFF);
TouchScreen.DrawTexture(MortalIcons[1],false,200-fw/2,72+8,DTA_SrcY,gfired*32,DTA_SrcHeight,32,DTA_DestHeight,32,DTA_Alpha,alph*.8,DTA_LegacyRenderStyle,STYLE_AddStencil,DTA_FillColor,gfired?0xFF808080:0xFFFFFFFF);
}
}
if ( lowammotic && (lowammotic > gametic) )

View file

@ -619,6 +619,9 @@ Class MisterGrenade : Actor
// direct hit from main grenade
if ( !bAMBUSH && (vel dot oldvel < .5) )
{
// ensure we can leave a decal
angle += 180;
pitch = -pitch;
ExplodeMissile();
return;
}

View file

@ -215,6 +215,9 @@ Class ExplodiumMagProj : Actor
A_StartSound("explodium/mag");
return;
}
// ensure we can leave a decal
angle += 180;
pitch = -pitch;
ExplodeMissile();
}
States

View file

@ -748,6 +748,9 @@ Class CandyMagProj : Actor
A_StartSound("explodium/mag");
return;
}
// ensure we can leave a decal
angle += 180;
pitch = -pitch;
ExplodeMissile();
}
States