Dynamic light binding issue not entirely fixed

Sun Sep 26, 2021 1:01 am

It appears that this issue was not entirely fixed. For example, player classes with states marked Light(...) still don't work properly. Example code and PWAD below.

Code:
class TestPlayer : DoomPlayer
{
    States
    {
        Melee:
            PLAY F 6 BRIGHT Light("ZOMBIEATK");
            Goto Missile;
    }
}

Works in GZDoom 4.6.1, broken in 4.7.0 and above (tested with g4.8pre-7-gb59554f31, which should contain the fix to the mentioned issue). To reproduce, load the attached WAD file, then go to any map and fire a weapon. A light should appear around the player, but it does not happen in recent versions.
You do not have the required permissions to view the files attached to this post.

Re: Dynamic light binding issue not entirely fixed

Sun Sep 26, 2021 7:34 am

OK, sorry, it looks like this is a duplicate of this report, while I thought that the other report was actually a duplicate of the original issue that was fixed. Please close this.

Re: Dynamic light binding issue not entirely fixed

Sun Oct 03, 2021 7:44 am

fixed

Re: Dynamic light binding issue not entirely fixed

Thu Oct 14, 2021 10:09 am

I'd like to reopen this by saying that it's far from fixed. Attached lights in an actor state now won't detach once that state passes.

Example to reproduce bug here. There are two lights blinking every two seconds. One starts on and one starts off. Normally, the light would be alternating properly, but once the second light goes bright, the light never turns off ever again.

Re: Dynamic light binding issue not entirely fixed

Thu Oct 14, 2021 10:54 am

I just noticed in Quake Champions : Doom Edition that the Quake grunt enemies, once they have fired a shot are permanently lit by a yellow dynamic light (even when they are dead). I'd started to dig inside the files but it looks like it's probably the same issue.

Re: Dynamic light binding issue not entirely fixed

Thu Oct 14, 2021 11:13 am

Confirmed, same here, reproducible even with vanilla IWADs and lights.pk3.

Re: Dynamic light binding issue not entirely fixed

Thu Oct 14, 2021 11:23 am

Player701 wrote:reproducible even with vanilla IWADs and lights.pk3.

Surely not with the vanilla actors though? I'm not seeing it with them - only with actors that have lights attached in their states - which the vanilla monsters don't have (they are allocated on GLDEFS).

Re: Dynamic light binding issue not entirely fixed

Thu Oct 14, 2021 11:24 am

Oops, sorry, forgot I was autoloading a mod. Too much work today... :? Yes, it only happens with lights attached via states, sorry again.

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 12:58 am

Should be fixed now, but I won't be able to test it myself right now

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 2:00 am

It does seem to be fixed, yes.

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 2:07 am

Ok, then I can finally do the 4.7.1 release this evening.

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 3:24 am

This is a fast fix and should be included: https://github.com/coelckers/gzdoom/pull/1490

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 3:44 am

Yes, absolutely.

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 6:57 am

What about this one? viewtopic.php?f=2&t=73421

Re: Dynamic light binding issue not entirely fixed

Tue Oct 19, 2021 7:43 am

That one is not a trivial fix and generally avoidable by reordering one's definitions. So it's of lower priority.