Mutliple Dynamic Lights possible bug/limitation

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Mutliple Dynamic Lights possible bug/limitation

Post by Enjay »

I think this has always worked like this and it may well be how it's meant to be but, just in case...

It is possible to add two dynamic lights to an actor at the same time. The definition for the blur sphere in lights.pk3, for example, does this. However, it seems to require one light to be given to the sprite "family" name and subsequent lights to be given to individual frames. This means that two totally different lights cannot be added to different frames within the same actor.

Example attached. In the foreground centre, there is an actor with a single white light attached. To one side there is an actor with an offset red light and to the other side is an actor with a blue light. This are just there to check that the definitions work.

In the background is a fourth actor. This has the white light attached to all frames and the red and blue lights attached to alternate frames. If you load up the file, it works as intended: the fourth actor has a constant white light and alternating red and blue lights.

Relevant section of Doomdefs:
[spoiler]

Code: Select all

object TestLamp4
{
    frame TLMP { light TestLight1 }

    frame TLMPA { light TestLight2 }
    frame TLMPB { light TestLight3 }
}
[/spoiler]

Image

If, however, the Doomdefs is altered so that the white light is only attached to frame A:

[spoiler]

Code: Select all

object TestLamp4
{
    frame TLMPA { light TestLight1 }

    frame TLMPA { light TestLight2 }
    frame TLMPB { light TestLight3 }
}
[/spoiler]

Then the white light (which I hoped would switch on and off with frame A, but also be there at the same time as the red light) doesn't work at all (it is presumably being overwritten by the second allocation of a light to frame A).

Image

As I said, this could well be how it is meant to be but I thought that it was worth checking.
Attachments
testlamp.pk3
(1.25 KiB) Downloaded 33 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Mutliple Dynamic Lights possible bug/limitation

Post by Graf Zahl »

This is not a bug but a limitation of how the definition works. Timmie has done some strange things there that were carried over to GZDoom. Essentially you can attach a light to a sprite and to a frame but only one to each. What you try is attaching a second light to a frame and that's simply not supported.
User avatar
NeuralStunner
Posts: 253
Joined: Tue Dec 29, 2009 3:46
Location: IN SPACE
Contact:

Re: Mutliple Dynamic Lights possible bug/limitation

Post by NeuralStunner »

What happens if you attach a light to a frame through GLDefs and another one to the same frame in Decorate?
Dean Koontz wrote:Human beings can always be relied upon to exert, with vigor, their God-given right to be stupid.
Spoiler: System Specs
Locked

Return to “Closed Bugs”