diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index d217b92ee..16be5d613 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -265,16 +265,6 @@ DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05 -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 -} - 3D8ED20BF5CAAE6D6AE0E10999C75084 // hgarden.pk3 map01 { // spawn trees on top of arches diff --git a/wadsrc/static/zscript/level_compatibility.txt b/wadsrc/static/zscript/level_compatibility.txt index 9f63b8811..d16a0a133 100644 --- a/wadsrc/static/zscript/level_compatibility.txt +++ b/wadsrc/static/zscript/level_compatibility.txt @@ -476,6 +476,16 @@ class LevelCompatibility play break; } + case '39C594CAC07EE51C80F757DA465FCC94': // strife1.wad map10 + { + // fix the shooting range by matching sector 138 and 145 properties together + OffsetSectorPlane(145, Sector.floor, -32); + OffsetSectorPlane(145, Sector.ceiling, 40); + SetSectorTexture(145, Sector.floor, "F_CONCRP"); + SetSectorLight(138, 192); + SetWallTexture(3431, Line.back, Side.top, "BRKGRY01"); + } + case 'DB31D71B11E3E4393B9C0CCB44A8639F': // rop_2015.wad e1m5 { // Lower floor a bit so secret switch becomes accessible @@ -546,4 +556,19 @@ class LevelCompatibility play { level.sectors[sectornum].special = special; } + + private static void SetSectorTextureID(int sectornum, int plane, TextureID texture) + { + level.sectors[sectornum].SetTexture(plane, texture); + } + + private static void SetSectorTexture(int sectornum, int plane, String texture) + { + SetSectorTextureID(sectornum, plane, TexMan.CheckForTexture(texture, TexMan.Type_Flat)); + } + + private static void SetSectorLight(int sectornum, int newval) + { + level.sectors[sectornum].SetLightLevel(newval); + } }