I noticed today that maps 21-30 of Requiem (1997) display a missing texture for the sky using the WadSmoosh IWAD. This issue seems subtle and unrelated to the previous compat challenges I was fixing. I pared down the relevant content and zscript to a minimal example case, ZIP is attached.
To reproduce the issue I'm seeing using only the ZIP (ie without needing to touch WadSmoosh), run this:
Code: Select all
gzdoom -iwad doom2.wad -file skytest.pk3 req2.wad -warp 21
Now run this, using another example WAD (based on Alien Vendetta) with a very similiar setup, but works as expected:
Code: Select all
gzdoom -iwad doom2.wad -file skytest.pk3 av2.wad -warp 21
Strangely, loading up map15 (which uses SKY2) provides the correct result with both example wads.
The core of WadSmoosh's Doom 2 custom sky detection is this:
Code: Select all
TextureID skyA = TexMan.CheckForTexture("SKY3", TexMan.Type_Any, TexMan.Type_Any);
TextureID skyB = TexMan.CheckForTexture("SKY3", TexMan.Type_Override, TexMan.Type_Any);
if ( skyA == skyB )
return; // do nothing
level.ChangeSky(skyA, skyA);
For all other WADs, including the av2.wad example provided, the skyA TextureID comes back as a valid (non-zero) value. For the req2.wad example, the skyA TextureID is 0, and I can't figure out why. This is what has me wondering if it's a bug with GZDoom. Maybe req2.wad's similar SKY3 patch names (RSKY31, RSKY32, RSKY33) aren't getting handled correctly deep in some asset loading code? Maybe I'm misusing CheckForTexture? I'm not super familiar with the nuances of texture namespaces. Any ideas?