It looks like this may need to be a feature suggestion (or does this count as a bug? It never worked, so...).
Internally, the flicker frequency is controlled by the 'specialf1' variable; all dynamic lights (including spotlights) automatically have their 'specialf1' variable initialized with the actor's normalized angle in
their BeginPlay call. Obviously this isn't a valid solution for spotlights, since they are directional.
Something like this in ZScript works right now as a workaround:
Code: Select all
class SpotlightFlickerAbjustable : SpotlightFlicker replaces SpotlightFlicker
{
int user_frequency;
override void PostBeginPlay()
{
Super.PostBeginPlay();
specialf1 = user_frequency;
}
}
You can set the 'user_frequency' variable via UDMF, and it will affect the spotlight's flicker frequency on spawn... But an engine-side change to add another dynamic light actor property and/or variable for frequency that would override angle if set on any dynlight would probably be better.
I can add something like this this to BoA if you want... Just know that we may want to go back and replace them all in the future.
It looks like this may need to be a feature suggestion (or does this count as a bug? It never worked, so...).
Internally, the flicker frequency is controlled by the 'specialf1' variable; all dynamic lights (including spotlights) automatically have their 'specialf1' variable initialized with the actor's normalized angle in [url=https://github.com/coelckers/gzdoom/blob/master/src/g_shared/a_dynlight.cpp#L169]their BeginPlay call[/url]. Obviously this isn't a valid solution for spotlights, since they are directional.
Something like this in ZScript works right now as a workaround:
[code]class SpotlightFlickerAbjustable : SpotlightFlicker replaces SpotlightFlicker
{
int user_frequency;
override void PostBeginPlay()
{
Super.PostBeginPlay();
specialf1 = user_frequency;
}
}[/code]
You can set the 'user_frequency' variable via UDMF, and it will affect the spotlight's flicker frequency on spawn... But an engine-side change to add another dynamic light actor property and/or variable for frequency that would override angle if set on any dynlight would probably be better.
I can add something like this this to BoA if you want... Just know that we may want to go back and replace them all in the future.