- fixed incorrect sector in a few sprites of World Tour E5L1.

This commit is contained in:
Christoph Oelckers 2023-01-14 13:18:53 +01:00
parent 59820f9fed
commit 6c3d03cd48
4 changed files with 20 additions and 0 deletions

View file

@ -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 = &sector[sect];
return 0;
}
DEFINE_ACTION_FUNCTION(DLevelPostProcessor, ChangeSpriteFlags)
{
PARAM_SELF_PROLOGUE(DLevelPostProcessor);

View file

@ -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;

View file

@ -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.

View file

@ -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);