View Issue Details

IDProjectCategoryView StatusLast Update
0005699The Dark ModCodingpublic09.08.2021 15:50
ReporterMirceaKitsune Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Product VersionSVN 
Summary0005699: hide_distance not initialized for attached lights, ignores entities that were hidden or lights which are turned off
DescriptionA much welcome fix to 0005668 was introduced to the engine, fixing a long standing issue with hide_distance not working on lights and not hiding them based on distance. I upgraded to the latest development version (dev16342-9552) and tested it on my map where I'm already using this feature for light sources. The hiding works for both torches and electrical lights, but with some breakage for lights that start / were triggered off or spawn outside their hide distance from the player.

First is the issue I'm seeing with torches (attached lights): If you give a torch a hide_distance, the light and flame of that torch will show up when the game starts if this torch spawns beyond the distance. Once the player walks within hide_distance range the whole torch shows up accordingly, and when they step beyond it the whole torch gets hidden correctly.

The second issue I noticed with electrical lights; It affects lamps that have the start_off spawnarg, potentially also ones that were triggered off... I haven't tested if this affects extinguished torches too, please verify if possible. When you walk within hide_distance of a lamp that was turned off, that lamp gets turned on regardless. Distance hiding ignores that the lamp is supposed to be turned off, and in this case only its unlit model is supposed to show up unless it gets triggered on.
Steps To ReproduceIssue 1:

Step 1: Place an atdm:torch_gothic02_wall entity on your map.
Step 2: Give it a hide_distance, say 1000. Make sure the torch is further from the info_player_start entity than this distance yet you can still see it from beyond.
Step 3: dmap and map to start the level. Walk toward the torch while looking at it.
Result: The torch flame starts out visible beyond the hide_distance. It only gets hidden once you've been within distance then exited it, not initially as well.

Issue 2:

Step 1: Place an atdm:streetlamp_square_01_lit somewhere on the map.
Step 2: Give it a hide_distance, say 1000.
Step 3: Also enable the start_off spawnarg so it's disabled by default, this should simulate what happens when a button turns it off too.
Step 4: dmap, map, connect. Walk within hide_distance of the lamp then out.
Result: The light starts off as desired. Once you walk within hide_distance to its entity however, the lamp turns itself on.
Additional InformationIt should be noted that similar results can be seen with other entities: If you give a func_static model both the spawnargs "hide 1" and "hide_distance 500", that entity will be shown when you enter its hiding distance even if it's meant to be hidden. The ideal functionality would be for hiding to work independently, so an entity is invisible if it's set to be hidden OR outside the specified hide_distance parameter.
Tagslod

Activities

Dragofer

Dragofer

09.08.2021 15:40

developer   ~0014272

Just saying, if there are 2 issues it'd be a good idea to have 2 tickets for them. It makes tracking and working on the 2 issues easier.
MirceaKitsune

MirceaKitsune

09.08.2021 15:50

reporter   ~0014273

Sorry: Was unsure if they're completely separate issues or have the same root cause, didn't want to fill the tracker unnecessarily.

I just conducted some tests to confirm extinguished torches aren't also affected. Those seem to be okay: If you put a torch out with the water arrow then travel beyond its hide_distance, it doesn't relight when you get near it... if you relight it with a fire arrow the LOD system knows to show the lit version again. This seems to affect just direct light sources such as electrical lights, only they ignore if the entity is unlit when it comes into view and fallback to making it lit.

Issue History

Date Modified Username Field Change
09.08.2021 14:26 MirceaKitsune New Issue
09.08.2021 14:26 MirceaKitsune Tag Attached: lod
09.08.2021 15:40 Dragofer Note Added: 0014272
09.08.2021 15:50 MirceaKitsune Note Added: 0014273