[Fixed] Door lighttag doesn't work

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Door lighttag doesn't work

Post by Graf Zahl »

After some debugging I found the cause:

This is the current code:

Code: Select all

			EV_LightTurnOnPartway (m_LightTag, FixedDiv (m_Sector->ceilingplane.d - m_Sector->floorplane.d,
				m_TopDist - m_Sector->floorplane.d));
ceilingplane.d and floorplane.d have inverted signs so to work correctly it must be:

Code: Select all

			EV_LightTurnOnPartway (m_LightTag, FixedDiv (m_Sector->ceilingplane.d + m_Sector->floorplane.d,
				m_TopDist + m_Sector->floorplane.d));

in both the UP and DOWN case.


Furthermore due to the sign inversion of the planes the following comparison doesn't work:

Code: Select all

m_TopDist != m_Sector->floor.plane.d
because m_TopDist has the sign of the ceiling, not the floor.
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Post by Csonicgo »

ah hah. What exactly is that used for?

it seems half the features in Zdoom arent even used.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It is used to gradually light a sector when a door opens.
That's rather new. But it is documented. Just read the Wiki. BTW, that's a Boom feature that was missing from ZDoom until recently.
User avatar
Curunir
Posts: 1040
Joined: Sun Nov 02, 2003 11:24 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Post by Curunir »

Are you sure this is broken?

It works for me. Not in this map, but it still works.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

It didn't work for me and after the fix above it did.

The light level should rise gradually when the door opens and lower when it closes.
For me upon opening it went abruptly to the maximum and didn't lower when it closed. Depending on the sector's height there may be situations where it works. My sector had a floor height of -740 and a ceiling height of -672 and with these values the bug was quite obvious. When the floor height is 0 it will work because -0==0 and when it is close to 0 it appears to work because the error isn't obvious then.
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

Another boom feature that ZDoom doesn't support is the use of custom translucency mappings on translucent lines. Oh, and I have never had the door not light the tagged sector with the recent version of zdoom ever before, it has always worked fine.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

MasterOFDeath wrote: Oh, and I have never had the door not light the tagged sector with the recent version of zdoom ever before, it has always worked fine.

What?
Can someone please explain what this sentence really means???
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

He means lighttag works for him.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Only if the floor height is close to 0.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Post by Xaser »

MasterOFDeath wrote:Another boom feature that ZDoom doesn't support is the use of custom translucency mappings on translucent lines.
Hmm... sounds interesting. so you can make different parts of a texture have different transluscency?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Essentially it is a 256x256 map that specifies how each color of the palette blends with each other. Many of ZDoom's advanced features like fog and colored light may easily break these maps to the point of uselessness. ZDoom uses a completely different method to create translucent surfaces than Boom if I am not mistaken.
User avatar
GeeDougg
Posts: 3651
Joined: Fri Jul 16, 2004 2:39 pm
Location: VanCity, British Colonies, Isolated Republic Of Canuckistan
Contact:

Post by GeeDougg »

Is this the "Boom Door Light Trick" feature that's in the "compatibility options menu" of ZDoom?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Yes.
User avatar
MasterOFDeath
... in rememberance ...
Posts: 2024
Joined: Sat Apr 03, 2004 10:58 am

Post by MasterOFDeath »

Graf Zahl wrote:Essentially it is a 256x256 map that specifies how each color of the palette blends with each other. Many of ZDoom's advanced features like fog and colored light may easily break these maps to the point of uselessness. ZDoom uses a completely different method to create translucent surfaces than Boom if I am not mistaken.
True, but its just a simple translusency map, how hard would it be to implement?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

I don't know because I never looked at the rendering code. What I was saying is that the way this translucency map works it is likely it will not work properly with colored light etc. because you could practically do everything with it.
Post Reply

Return to “Closed Bugs [GZDoom]”