diff --git a/source/core/postprocessor.cpp b/source/core/postprocessor.cpp index f296e08ae..dea137219 100644 --- a/source/core/postprocessor.cpp +++ b/source/core/postprocessor.cpp @@ -103,6 +103,17 @@ DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetSpriteLotag) return 0; } +DEFINE_ACTION_FUNCTION(DLevelPostProcessor, SetSpriteSector) +{ + PARAM_SELF_PROLOGUE(DLevelPostProcessor); + PARAM_UINT(sprite); + PARAM_INT(sect); + if (sprite < self->sprites->sprites.Size()) + self->sprites->sprites[sprite].sectp = §or[sect]; + + return 0; +} + DEFINE_ACTION_FUNCTION(DLevelPostProcessor, ChangeSpriteFlags) { PARAM_SELF_PROLOGUE(DLevelPostProcessor); diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 8fccda3fa..b1d28d2ec 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -1128,6 +1128,10 @@ int HWWall::CheckWallSprite(tspritetype* spr, tspritetype* last) void HWWall::ProcessWallSprite(HWDrawInfo* di, tspritetype* spr, sectortype* sector) { + if (spr->time == 1373) + { + int a = 0; + } auto tex = TexMan.GetGameTexture(spr->spritetexture()); if (!tex || !tex->isValid()) return; diff --git a/wadsrc/static/zscript/level_compatibility.zs b/wadsrc/static/zscript/level_compatibility.zs index e1135f56e..13ecda6f5 100644 --- a/wadsrc/static/zscript/level_compatibility.zs +++ b/wadsrc/static/zscript/level_compatibility.zs @@ -12,6 +12,10 @@ class LevelCompatibility : LevelPostProcessor case 'b522da99f32a71ab31fc27aaba9b7f43': // Duke E2L1 World Tour SplitSector(37, 269, 274); // sector bleeds into another area. break; + + case '459c71d47b5beaa058253e162fd5a5c2': // World Tour e5l1.map + for(int i = 1373; i <= 1376; i++) SetSpriteSector(i, 860); // fix bad sector in a few sprites. + break; case 'c3bfb6a6e7cded2e5fe16cea86632d79': // CP07 SplitSector(33, 192, 196); // sector bleeds into another area. diff --git a/wadsrc/static/zscript/level_postprocessor.zs b/wadsrc/static/zscript/level_postprocessor.zs index 02ec4cab0..570db5c86 100644 --- a/wadsrc/static/zscript/level_postprocessor.zs +++ b/wadsrc/static/zscript/level_postprocessor.zs @@ -6,6 +6,7 @@ class LevelPostProcessor native play } protected native void SetSpriteLotag(int sprite, int tag); + protected native void SetSpriteSector(int sprite, int tag); protected native void ChangeSpriteFlags(int sprite, int set, int clear); protected native void sw_serp_continue(); protected native void SplitSector(int sect, int wal1, int wal2);