A_AttachLight and friends are too performance intensive. Fall back to just spawning light actors.

This commit is contained in:
Marisa the Magician 2019-09-26 10:57:32 +02:00
commit 64ab1c6633
6 changed files with 130 additions and 77 deletions

View file

@ -10,6 +10,14 @@ Class PeaceAmmo : Ammo
}
}
Class PeaceLight : RocketLight
{
Default
{
Args 255,128,112,32;
}
}
Class PeaceTrail : Actor
{
Default
@ -27,14 +35,14 @@ Class PeaceTrail : Actor
override void PostBeginPlay()
{
Super.PostBeginPlay();
A_AttachLight('RocketLight',DynamicLight.PointLight,Color(255,128,112),32,32);
let l = Spawn("PeaceLight",pos);
l.target = self;
}
override void Tick()
{
Super.Tick();
if ( !target || !target.bMISSILE )
{
A_RemoveLight('RocketLight');
Destroy();
return;
}