Golden Shells emit sparkles, for visibility.

This commit is contained in:
Mari the Deer 2020-06-04 19:31:13 +02:00
commit 7086b10d56
2 changed files with 42 additions and 3 deletions

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\cxSWWM GZ\c- r303 (Thu 4 Jun 19:17:32 CEST 2020)";
SWWM_MODVER="\cxSWWM GZ\c- r304 (Thu 4 Jun 19:31:14 CEST 2020)";

View file

@ -463,11 +463,50 @@ Class PurpleShell4 : PurpleShell
}
}
Class GoldShellSparkle : Actor
{
override void PostBeginPlay()
{
Scale *= FRandom[Goldy](.5,1.5);
vel.z = FRandom[Goldy](.5,1.5);
}
override void Tick()
{
if ( isFrozen() ) return;
SetOrigin(Vec3Offset(0,0,vel.z),true);
alpha -= .02;
if ( alpha <= 0 ) Destroy();
}
Default
{
RenderStyle "Add";
Scale 0.05;
+NOGRAVITY;
+NOBLOCKMAP;
+NOINTERACTION;
+DONTSPLASH;
+NOTELEPORT;
+FORCEXYBILLBOARD;
}
States
{
Spawn:
BLPF A -1 Bright;
Stop;
}
}
Class GoldShell : Ammo
{
Mixin SWWMShellAmmo;
Mixin SWWMAmmo;
action void A_GoldShellTrail()
{
if ( Random[Goldy](0,2) ) return;
Spawn("GoldShellSparkle",Vec3Offset(FRandom[Goldy](-2,2),FRandom[Goldy](-2,2),FRandom[Goldy](10,18)));
}
Default
{
Tag "$T_GOLDSHELLS";
@ -483,8 +522,8 @@ Class GoldShell : Ammo
States
{
Spawn:
XZW1 A -1;
Stop;
XZW1 A 1 A_GoldShellTrail();
Wait;
}
}