Zandronum Chat on our Discord Server Get the latest version: 3.2.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004482Zandronum[All Projects] Bugpublic2025-03-31 17:122025-10-31 16:27
ReporterIlyStr 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionbackport later 
PlatformASRock B550, AMD Ryzen 5 56 x64OSWindows 10 LTSC EnterpriseOS Version21H2 (19044.357)
Product Version4.0-beta 
Target VersionFixed in Version 
Summary0004482: Flicker dyn.light's radius chance is inverted (Relatively to GZDoom and UDB)
DescriptionIn GZDoom and UDB:
1 — Almost always radius №2
359 — Almost always radius №1

Zandronum:
1 — Almost always radius №1
359 — Almost always radius №2

Why? It's supposed to be easily solved here
'https://github.com/TorrSamaho/zandronum/blob/2ec1c262355a59762353dc9594d6f3c3b79fb508/src/gl/dynlights/a_dynlight.cpp#L267 [^]'
```
        m_currentIntensity = float(m_intensity[rnd >= (1.f-pct) * 255]);
```

or more accurately here
'https://github.com/TorrSamaho/zandronum/blob/2ec1c262355a59762353dc9594d6f3c3b79fb508/src/gl/dynlights/a_dynlight.cpp#L265 [^]'
```
        float pct = ANGLE_TO_FLOAT(360-angle)/360.f;
```
Additional InformationI have 16+ dyn. flicker lights on map with second radius 0 and angle 350

Max lights on in GZDoom:'https://imgur.com/emuYEjQ [^]'
Max lights on in Zandronum:'https://imgur.com/zWiYzT7 [^]'
Attached Files

- Relationships

-  Notes
User avatar (0024372)
IlyStr (reporter)
2025-03-31 17:14
edited on: 2025-03-31 17:17

And yes, I know that git thread is just a duplicate of heptapod's stable thread

User avatar (0024374)
IlyStr (reporter)
2025-03-31 19:06

In general, it's best to backport from GZDoom.

'https://github.com/ZDoom/gzdoom/blob/master/src/playsim/a_dynlight.cpp [^]'
```
    case FlickerLight:
    {
// float rnd = randLight(360); if FRandom in Za can process arguments
//or if Za's FRandom cannot do this
        float rnd = randLight % 360.f;
        m_currentRadius = float((rnd < ANGLE_TO_FLOAT(angle))? pArgs[LIGHT_INTENSITY] : pArgs[LIGHT_SECONDARY_INTENSITY]);
        break;
    }
```
User avatar (0024609)
Ru5tK1ng (updater)
2025-10-31 16:27

The way the flicker lights are handled was changed by GZDoom 2.2. So the issue will be resolved when Zandro's codebase upgrades to this version of GZ. Zan 4.0 will be GZ 2.2 and that version is dropping next after 3.3.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2025-03-31 17:12 IlyStr New Issue
2025-03-31 17:14 IlyStr Note Added: 0024372
2025-03-31 17:17 IlyStr Note Edited: 0024372 View Revisions
2025-03-31 19:06 IlyStr Note Added: 0024374
2025-10-31 16:27 Ru5tK1ng Note Added: 0024609
2025-10-31 16:27 Ru5tK1ng Status new => confirmed
2025-10-31 16:27 Ru5tK1ng Resolution open => backport later






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker