mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- fully fix Strife1.wad's MAP10 shooting range.
- added the following compatibility.txt properties: setsectortexture, setsectorlight
This commit is contained in:
parent
9c97ab0b1e
commit
029788976d
2 changed files with 68 additions and 0 deletions
|
@ -90,6 +90,8 @@ enum
|
|||
CP_SETTHINGFLAGS,
|
||||
CP_SETVERTEX,
|
||||
CP_SETTHINGSKILLS,
|
||||
CP_SETSECTORTEXTURE,
|
||||
CP_SETSECTORLIGHT,
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
@ -398,6 +400,33 @@ void ParseCompatibility()
|
|||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
}
|
||||
else if (sc.Compare("setsectortexture"))
|
||||
{
|
||||
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
|
||||
CompatParams.Push(CP_SETSECTORTEXTURE);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
sc.MustGetString();
|
||||
CompatParams.Push(sc.MustMatchString(SectorPlanes));
|
||||
sc.MustGetString();
|
||||
const FString texName = sc.String;
|
||||
const unsigned int texIndex = TexNames.Find(texName);
|
||||
const unsigned int texCount = TexNames.Size();
|
||||
if (texIndex == texCount)
|
||||
{
|
||||
TexNames.Push(texName);
|
||||
}
|
||||
CompatParams.Push(texIndex);
|
||||
}
|
||||
else if (sc.Compare("setsectorlight"))
|
||||
{
|
||||
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
|
||||
CompatParams.Push(CP_SETSECTORLIGHT);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
sc.MustGetNumber();
|
||||
CompatParams.Push(sc.Number);
|
||||
}
|
||||
else
|
||||
{
|
||||
sc.UnGet();
|
||||
|
@ -690,6 +719,35 @@ void SetCompatibilityParams()
|
|||
i += 3;
|
||||
break;
|
||||
}
|
||||
case CP_SETSECTORTEXTURE:
|
||||
{
|
||||
if ((unsigned)CompatParams[i + 1] < level.sectors.Size())
|
||||
{
|
||||
sector_t *sec = &level.sectors[CompatParams[i+1]];
|
||||
assert (sec != nullptr);
|
||||
secplane_t& plane = sector_t::floor == CompatParams[i + 2]
|
||||
? sec->floorplane
|
||||
: sec->ceilingplane;
|
||||
assert(TexNames.Size() > (unsigned int)CompatParams[i + 3]);
|
||||
const FTextureID texID = TexMan.GetTexture(TexNames[CompatParams[i + 3]], FTexture::TEX_Any);
|
||||
|
||||
sec->SetTexture(CompatParams[i + 2], texID);
|
||||
}
|
||||
i += 4;
|
||||
break;
|
||||
}
|
||||
case CP_SETSECTORLIGHT:
|
||||
{
|
||||
if ((unsigned)CompatParams[i + 1] < level.sectors.Size())
|
||||
{
|
||||
sector_t *sec = &level.sectors[CompatParams[i+1]];
|
||||
assert (sec != nullptr);
|
||||
|
||||
sec->SetLightLevel((unsigned)CompatParams[i + 2]);
|
||||
}
|
||||
i += 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -633,3 +633,13 @@ CA3773ED313E8899311F3DD0CA195A68 // e3m6
|
|||
setwalltexture 1277 back top CSTLRCK
|
||||
setwalltexture 1278 front top CSTLRCK
|
||||
}
|
||||
|
||||
39C594CAC07EE51C80F757DA465FCC94 // strife1.wad map10
|
||||
{
|
||||
// fix the shooting range by matching sector 138 and 145 properties together
|
||||
setsectoroffset 145 floor -32
|
||||
setsectoroffset 145 ceil 40
|
||||
setsectortexture 145 floor F_CONCRP
|
||||
setsectorlight 138 192
|
||||
setwalltexture 3431 back top BRKGRY01
|
||||
}
|
Loading…
Reference in a new issue