gfb107f80e AttachLight flashlight is invisible

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.
Post Reply
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

gfb107f80e AttachLight flashlight is invisible

Post by Nash »

Easy to reproduce test mod: https://github.com/nashmuhandes/BetterS ... Strife.pk3

Load it up and press F to turn on the spotlight-based flashlight.

Worked correctly in GZDoom 4.6.1.

Here's how I do it in the ZScript if it's of any relevance: https://github.com/nashmuhandes/BetterS ... gin.zc#L95
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: gfb107f80e AttachLight flashlight is invisible

Post by Blue Shadow »

Works fine for me. Tested it with 4.7.0pre-193-g614b8477b and 4.7.0pre-195-g3acc5a272 (one build before and another after the one mentioned in the title), using OpenGL as the backend. I can't test the Vulkan backend due to lack of support.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: gfb107f80e AttachLight flashlight is invisible

Post by Nash »

I just updated to the latest master commit at the time of this post and it still doesn't work. Tried both OpenGL and Vulkan.

Nuked my INI and tested fresh, also doesn't work.

EDIT: Also updated my nvidia drivers, no difference. I'm using an RTX 2080.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: gfb107f80e AttachLight flashlight is invisible

Post by Blue Shadow »

Okay, something weird is going on. If I run the game without lights.pk3, the flashlight doesn't work (i.e. it doesn't shine light when turned on). The flashlight shouldn't need lights.pk3 since its light is created on the fly and doesn't rely on existing definition.

In 4.6.1, the flashlight works whether lights.pk3 is loaded or not.

Edit: After more testing, starting the game without lights.pk3 loaded, the flashlight's light doesn't appear (as I'd found out earlier). Once I toggle the console on and off, the light then appears as normal.
Last edited by Blue Shadow on Mon Sep 20, 2021 3:58 am, edited 1 time in total.
User avatar
drfrag
Vintage GZDoom Developer
Posts: 3141
Joined: Fri Apr 23, 2004 3:51 am
Location: Spain
Contact:

Re: gfb107f80e AttachLight flashlight is invisible

Post by drfrag »

It also happens in LZDoom since i merged the changes to the dynamic lights recreation.
I suspect this commit: https://github.com/coelckers/gzdoom/com ... e53bcafbbe
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: gfb107f80e AttachLight flashlight is invisible

Post by Nash »

Blue Shadow wrote:
Edit: After more testing, starting the game without lights.pk3 loaded, the flashlight's light doesn't appear (as I'd found out earlier). Once I toggle the console on and off, the light then appears as normal.
Now THAT'S a very strange bug!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: gfb107f80e AttachLight flashlight is invisible

Post by Graf Zahl »

Fixed. This ran afoul of some shortcut check for maps without any lights at all to reduce processing time on them.
That check prevented that single first light from activating and needed to be done a little differently.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: gfb107f80e AttachLight flashlight is invisible

Post by Nash »

Thank you so much!
Post Reply

Return to “Closed Bugs [GZDoom]”