View Issue Details

IDProjectCategoryView StatusLast Update
0003819The Dark ModCodingpublic08.09.2014 12:12
ReporterSteveL Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilitysometimes
Status resolvedResolutionfixed 
Product VersionTDM 2.02 
Target VersionTDM 2.03Fixed in VersionTDM 2.03 
Summary0003819: Skybox sometimes blinks out while mantling up worldspawn
DescriptionPlayer origin passing through sharp corners of worldspawn brushes can cause the skybox to blink out. Not confirmed by me, just something I think I remember from forum discussions.
Additional InformationI saw a line of code and remembered that bug and meant to add a note to the tracker, but can't find one. Here's the line of code:

// determine if portal sky is in pvs
gameLocal.portalSkyActive = gameLocal.pvs.CheckAreasForPortalSky( gameLocal.GetPlayerPVS(), GetPhysics()->GetOrigin() );

This is the last line of idPlayer::Think(). The GetOrigin() is the bit I found suspicious. It's passing the player's origin instead of the eye position.
TagsNo tags attached.

Activities

Springheel

Springheel

22.08.2014 17:07

administrator   ~0006868

Good find! This has long been a pet peeve of mine.
tels

tels

22.08.2014 18:02

reporter   ~0006870

I can confirm this happens for me and is quite annoying visually.
SteveL

SteveL

22.08.2014 19:19

reporter   ~0006871

testing....
SteveL

SteveL

22.08.2014 19:34

reporter   ~0006873

Last edited: 22.08.2014 19:34

I didn't assign this to myself originally because I couldn't/can't rep it in a test map with several giants' stairways with steps 48, 96, and 103 units high. But I did think I'd seen it in an old map I was working on last winter, when climbing out of water in a certain spot, but wasn't certain enough to mark it confirmed. I've now dug that map out of my backups, and I can rep the skybox greying out with most mantles out of the water.

Confirmed that during the skyblink the player origin is in visleaf -1, i.e. outside the bsp like when noclipping. And that the function mentioned above short-circuits to "no skybox" during those frames, till the player moves again. Also that the code in that function makes *much* more sense if it's using the player's eye position instead of his or her origin.

Also tried a manual test: current code: skybox vanished 12 times out of 20 mantles. With fix, using eye position instead of origin: 0 out of 50 mantles. Removing fix again: 17 out of 20 mantles. I learned to make it happen more often by looking horizontally instead if up.

There's no way to be sure that this is the *only* cause, but it's a likely one. I'll commit the change.

SteveL

SteveL

22.08.2014 19:44

reporter   ~0006874

at rev 6085
SteveL

SteveL

23.08.2014 10:57

reporter   ~0006877

And at rev 6086. Found one more place that needed the same fix. That's all of them.
grayman

grayman

08.09.2014 04:27

viewer   ~0006961

Sweet. I've found a few places in the code where the Actor's (player and AI) origin was used when they should have used the Actor's eye position. So I suspect that we'll root a few more out as time goes by.

Some coder must've thought Actors see with their feet.
SteveL

SteveL

08.09.2014 12:12

reporter   ~0006963

Evidently :-) Cheers, I'll be on the lookout for them too then.

Issue History

Date Modified Username Field Change
18.08.2014 18:18 SteveL New Issue
18.08.2014 18:19 SteveL Description Updated
22.08.2014 17:07 Springheel Note Added: 0006868
22.08.2014 18:02 tels Note Added: 0006870
22.08.2014 18:02 tels Status new => confirmed
22.08.2014 19:18 SteveL Assigned To => SteveL
22.08.2014 19:18 SteveL Status confirmed => assigned
22.08.2014 19:19 SteveL Note Added: 0006871
22.08.2014 19:34 SteveL Note Added: 0006873
22.08.2014 19:34 SteveL Note Edited: 0006873
22.08.2014 19:44 SteveL Note Added: 0006874
22.08.2014 19:44 SteveL Status assigned => resolved
22.08.2014 19:44 SteveL Resolution open => fixed
23.08.2014 02:49 SteveL Fixed in Version => TDM 2.03
23.08.2014 10:57 SteveL Note Added: 0006877
01.09.2014 14:06 SteveL Target Version => TDM 2.03
08.09.2014 04:27 grayman Note Added: 0006961
08.09.2014 12:12 SteveL Note Added: 0006963