mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- replace SW specific sector flags with the global ones.
This commit is contained in:
parent
dddf48fd3e
commit
bea394a734
10 changed files with 65 additions and 95 deletions
|
@ -62,6 +62,7 @@ enum ESectorBits
|
|||
CSTAT_SECTOR_TRANS = 128,
|
||||
CSTAT_SECTOR_TRANS_INVERT = 256,
|
||||
CSTAT_SECTOR_METHOD = 384,
|
||||
CSTAT_SECTOR_FAF_BLOCK_HITSCAN = 32768, // SW only
|
||||
};
|
||||
|
||||
// Extended sector bit flags.
|
||||
|
|
|
@ -104,7 +104,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
|
|||
sp->sector()->ceilingpicnum = SP_TAG2(sp);
|
||||
SP_TAG4(sp) = sp->sector()->ceilingstat;
|
||||
SET(sp->sector()->ceilingstat, SP_TAG6(sp));
|
||||
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||
RESET(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
else if (SP_TAG3(sp) == 1)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
|
|||
sp->sector()->floorpicnum = SP_TAG2(sp);
|
||||
SP_TAG4(sp) = sp->sector()->floorstat;
|
||||
SET(sp->sector()->floorstat, SP_TAG6(sp));
|
||||
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||
RESET(sp->sector()->floorstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,15 +133,13 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se
|
|||
// restore ceilingpicnum and ceilingstat
|
||||
sp->sector()->ceilingpicnum = SP_TAG5(sp);
|
||||
sp->sector()->ceilingstat = SP_TAG4(sp);
|
||||
//RESET(sp->sector()->ceilingstat, CEILING_STAT_TYPE_MASK);
|
||||
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||
RESET(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
else if (SP_TAG3(sp) == 1)
|
||||
{
|
||||
sp->sector()->floorpicnum = SP_TAG5(sp);
|
||||
sp->sector()->floorstat = SP_TAG4(sp);
|
||||
//RESET(sp->sector()->floorstat, FLOOR_STAT_TYPE_MASK);
|
||||
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||
RESET(sp->sector()->floorstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -853,7 +853,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie
|
|||
tsp->shade = int8_t(newshade);
|
||||
}
|
||||
|
||||
if (TEST(tsectp->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(tsectp->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
newshade = tsp->shade;
|
||||
newshade += tsectp->ceilingshade;
|
||||
|
@ -1255,7 +1255,7 @@ void PreDraw(void)
|
|||
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
RESET(actor->s().sector()->floorstat, FLOOR_STAT_SLOPE);
|
||||
RESET(actor->s().sector()->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ void PostDraw(void)
|
|||
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
SET(actor->s().sector()->floorstat, FLOOR_STAT_SLOPE);
|
||||
SET(actor->s().sector()->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
}
|
||||
|
||||
it.Reset(STAT_FAF_COPY);
|
||||
|
@ -1383,7 +1383,7 @@ void UpdateWallPortalState()
|
|||
SP_TAG4(sp) = sp->sector()->ceilingstat;
|
||||
//SET(sp->sector()->ceilingstat, ((int)SP_TAG7(sp))<<7);
|
||||
SET(sp->sector()->ceilingstat, SP_TAG6(sp));
|
||||
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||
RESET(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
else if (SP_TAG3(sp) == 1)
|
||||
{
|
||||
|
@ -1392,7 +1392,7 @@ void UpdateWallPortalState()
|
|||
SP_TAG4(sp) = sp->sector()->floorstat;
|
||||
//SET(sp->sector()->floorstat, ((int)SP_TAG7(sp))<<7);
|
||||
SET(sp->sector()->floorstat, SP_TAG6(sp));
|
||||
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||
RESET(sp->sector()->floorstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1410,14 +1410,14 @@ void RestorePortalState()
|
|||
sp->sector()->ceilingpicnum = SP_TAG5(sp);
|
||||
sp->sector()->ceilingstat = SP_TAG4(sp);
|
||||
//RESET(sp->sector()->ceilingstat, CEILING_STAT_TYPE_MASK);
|
||||
RESET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||
RESET(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
else if (SP_TAG3(sp) == 1)
|
||||
{
|
||||
sp->sector()->floorpicnum = SP_TAG5(sp);
|
||||
sp->sector()->floorstat = SP_TAG4(sp);
|
||||
//RESET(sp->sector()->floorstat, FLOOR_STAT_TYPE_MASK);
|
||||
RESET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||
RESET(sp->sector()->floorstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -332,33 +332,6 @@ inline int SPRITEp_SIZE_BOS(const tspritetype* sp)
|
|||
#define OVER_SPRITE_XFLIP (BIT(3))
|
||||
#define OVER_SPRITE_YFLIP (BIT(4))
|
||||
|
||||
// system defines for status bits
|
||||
#define CEILING_STAT_PLAX BIT(0)
|
||||
#define CEILING_STAT_SLOPE BIT(1)
|
||||
#define CEILING_STAT_SWAPXY BIT(2)
|
||||
#define CEILING_STAT_SMOOSH BIT(3)
|
||||
#define CEILING_STAT_XFLIP BIT(4)
|
||||
#define CEILING_STAT_YFLIP BIT(5)
|
||||
#define CEILING_STAT_RELATIVE BIT(6)
|
||||
#define CEILING_STAT_TYPE_MASK (BIT(7)|BIT(8))
|
||||
#define CEILING_STAT_MASKED BIT(7)
|
||||
#define CEILING_STAT_TRANS BIT(8)
|
||||
#define CEILING_STAT_TRANS_FLIP (BIT(7)|BIT(8))
|
||||
#define CEILING_STAT_FAF_BLOCK_HITSCAN BIT(15)
|
||||
|
||||
#define FLOOR_STAT_PLAX BIT(0)
|
||||
#define FLOOR_STAT_SLOPE BIT(1)
|
||||
#define FLOOR_STAT_SWAPXY BIT(2)
|
||||
#define FLOOR_STAT_SMOOSH BIT(3)
|
||||
#define FLOOR_STAT_XFLIP BIT(4)
|
||||
#define FLOOR_STAT_YFLIP BIT(5)
|
||||
#define FLOOR_STAT_RELATIVE BIT(6)
|
||||
#define FLOOR_STAT_TYPE_MASK (BIT(7)|BIT(8))
|
||||
#define FLOOR_STAT_MASKED BIT(7)
|
||||
#define FLOOR_STAT_TRANS BIT(8)
|
||||
#define FLOOR_STAT_TRANS_FLIP (BIT(7)|BIT(8))
|
||||
#define FLOOR_STAT_FAF_BLOCK_HITSCAN BIT(15)
|
||||
|
||||
#undef CLIPMASK0 // defined in build.h
|
||||
#undef CLIPMASK1
|
||||
|
||||
|
|
|
@ -1597,7 +1597,7 @@ void SlipSlope(PLAYERp pp)
|
|||
|
||||
auto sectu = pp->cursector;
|
||||
|
||||
if (!TEST(sectu->flags, SECTFU_SLIDE_SECTOR) || !TEST(pp->cursector->floorstat, FLOOR_STAT_SLOPE))
|
||||
if (!TEST(sectu->flags, SECTFU_SLIDE_SECTOR) || !TEST(pp->cursector->floorstat, CSTAT_SECTOR_SLOPE))
|
||||
return;
|
||||
|
||||
ang = getangle(pp->cursector->firstWall()->delta());
|
||||
|
@ -1610,7 +1610,7 @@ void SlipSlope(PLAYERp pp)
|
|||
|
||||
void DoPlayerHorizon(PLAYERp pp, float const horz, double const scaleAdjust)
|
||||
{
|
||||
bool const canslopetilt = !TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING) && pp->cursector && TEST(pp->cursector->floorstat, FLOOR_STAT_SLOPE);
|
||||
bool const canslopetilt = !TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING) && pp->cursector && TEST(pp->cursector->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
pp->horizon.calcviewpitch(pp->pos.vec2, pp->angle.ang, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursector, scaleAdjust, TEST(pp->Flags, PF_CLIMBING));
|
||||
pp->horizon.applyinput(horz, &pp->input.actions, scaleAdjust);
|
||||
}
|
||||
|
@ -3487,7 +3487,7 @@ bool PlayerFallTest(PLAYERp pp, int player_height)
|
|||
// if on a STEEP slope sector and you have not moved off of the sector
|
||||
if (pp->lo_sectp &&
|
||||
labs(pp->lo_sectp->floorheinum) > 3000 &&
|
||||
TEST(pp->lo_sectp->floorstat, FLOOR_STAT_SLOPE) &&
|
||||
TEST(pp->lo_sectp->floorstat, CSTAT_SECTOR_SLOPE) &&
|
||||
pp->lo_sectp == pp->lastcursector)
|
||||
{
|
||||
return false;
|
||||
|
@ -4606,7 +4606,7 @@ int DoPlayerTestPlaxDeath(PLAYERp pp)
|
|||
USERp u = pp->Actor()->u();
|
||||
|
||||
// landed on a paralax floor
|
||||
if (pp->lo_sectp && TEST(pp->lo_sectp->floorstat, FLOOR_STAT_PLAX))
|
||||
if (pp->lo_sectp && TEST(pp->lo_sectp->floorstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
PlayerUpdateHealth(pp, -u->Health);
|
||||
PlayerCheckDeath(pp, nullptr);
|
||||
|
|
|
@ -214,7 +214,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
getzsofslopeptr(hit.hitSector, hit.hitpos.x, hit.hitpos.y, &hiz, &loz);
|
||||
if (abs(hit.hitpos.z - loz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectFloor(hit.hitSector) && !TEST(hit.hitSector->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
|
||||
if (FAF_ConnectFloor(hit.hitSector) && !TEST(hit.hitSector->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z + Z(12), &newsector);
|
||||
plax_found = true;
|
||||
|
@ -222,7 +222,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect,
|
|||
}
|
||||
else if (labs(hit.hitpos.z - hiz) < Z(4))
|
||||
{
|
||||
if (FAF_ConnectCeiling(hit.hitSector) && !TEST(hit.hitSector->floorstat, CEILING_STAT_FAF_BLOCK_HITSCAN))
|
||||
if (FAF_ConnectCeiling(hit.hitSector) && !TEST(hit.hitSector->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
updatesectorz(hit.hitpos.x, hit.hitpos.y, hit.hitpos.z - Z(12), &newsector);
|
||||
plax_found = true;
|
||||
|
@ -357,7 +357,7 @@ bool SectorZadjust(const Collision& ceilhit, int32_t* hiz, const Collision& flor
|
|||
if (FAF_ConnectFloor(hit_sector))
|
||||
{
|
||||
// rippers were dying through the floor in $rock
|
||||
if (TEST(hit_sector->floorstat, CEILING_STAT_FAF_BLOCK_HITSCAN))
|
||||
if (TEST(hit_sector->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
break;
|
||||
|
||||
if (TEST(hit_sector->extra, SECTFX_Z_ADJUST))
|
||||
|
@ -389,7 +389,7 @@ bool SectorZadjust(const Collision& ceilhit, int32_t* hiz, const Collision& flor
|
|||
}
|
||||
else
|
||||
// default adjustment for plax
|
||||
if (TEST(hit_sector->floorstat, FLOOR_STAT_PLAX))
|
||||
if (TEST(hit_sector->floorstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
*loz += PlaxFloorGlobZadjust;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ bool SectorZadjust(const Collision& ceilhit, int32_t* hiz, const Collision& flor
|
|||
}
|
||||
else
|
||||
// default adjustment for plax
|
||||
if (TEST(hit_sector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit_sector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
*hiz -= PlaxCeilGlobZadjust;
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ void FAFgetzrange(vec3_t pos, sectortype* sect, int32_t* hiz, Collision* ceilhit
|
|||
getzrange(npos, uppersect, hiz, *ceilhit, &foo1, foo2, clipdist, clipmask);
|
||||
SectorZadjust(*ceilhit, hiz, trash, nullptr);
|
||||
}
|
||||
else if (FAF_ConnectFloor(sect) && !TEST(sect->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
|
||||
else if (FAF_ConnectFloor(sect) && !TEST(sect->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
auto lowersect = sect;
|
||||
int newz = *loz + Z(2);
|
||||
|
@ -566,7 +566,7 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, sectortype* const sect,
|
|||
getzrangepoint(x, y, newz, uppersect, hiz, ceilhit, &foo1, &foo2);
|
||||
SectorZadjust(*ceilhit, hiz, trash, nullptr);
|
||||
}
|
||||
else if (FAF_ConnectFloor(sect) && !TEST(sect->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
|
||||
else if (FAF_ConnectFloor(sect) && !TEST(sect->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN))
|
||||
{
|
||||
auto lowersect = sect;
|
||||
int newz = *loz + Z(2);
|
||||
|
@ -593,13 +593,13 @@ void SetupMirrorTiles(void)
|
|||
if (sp->sector()->ceilingpicnum == FAF_PLACE_MIRROR_PIC)
|
||||
{
|
||||
sp->sector()->ceilingpicnum = FAF_MIRROR_PIC;
|
||||
SET(sp->sector()->ceilingstat, CEILING_STAT_PLAX);
|
||||
SET(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
|
||||
if (sp->sector()->floorpicnum == FAF_PLACE_MIRROR_PIC)
|
||||
{
|
||||
sp->sector()->floorpicnum = FAF_MIRROR_PIC;
|
||||
SET(sp->sector()->floorstat, FLOOR_STAT_PLAX);
|
||||
SET(sp->sector()->floorstat, CSTAT_SECTOR_SKY);
|
||||
}
|
||||
|
||||
if (sp->sector()->ceilingpicnum == FAF_PLACE_MIRROR_PIC+1)
|
||||
|
|
|
@ -414,7 +414,7 @@ void SectorSetup(void)
|
|||
SectorLiquidSet(sectp);
|
||||
}
|
||||
|
||||
if (TEST(sectp->floorstat, FLOOR_STAT_PLAX))
|
||||
if (TEST(sectp->floorstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
// don't do a z adjust for FAF area
|
||||
if (sectp->floorpicnum != FAF_PLACE_MIRROR_PIC)
|
||||
|
@ -423,7 +423,7 @@ void SectorSetup(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (TEST(sectp->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(sectp->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
// don't do a z adjust for FAF area
|
||||
if (sectp->ceilingpicnum != FAF_PLACE_MIRROR_PIC)
|
||||
|
@ -484,7 +484,7 @@ void SectorSetup(void)
|
|||
{
|
||||
case 0:
|
||||
SET(swf->flags, SINE_FLOOR);
|
||||
if (TEST(sectp->floorstat, FLOOR_STAT_SLOPE))
|
||||
if (TEST(sectp->floorstat, CSTAT_SECTOR_SLOPE))
|
||||
{
|
||||
SET(swf->flags, SINE_SLOPED);
|
||||
}
|
||||
|
@ -903,13 +903,13 @@ void DoExplodeSector(short match)
|
|||
if (SP_TAG5(esp))
|
||||
{
|
||||
sectp->floorheinum = SP_TAG5(esp);
|
||||
SET(sectp->floorstat, FLOOR_STAT_SLOPE);
|
||||
SET(sectp->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
}
|
||||
|
||||
if (SP_TAG6(esp))
|
||||
{
|
||||
sectp->ceilingheinum = SP_TAG6(esp);
|
||||
SET(sectp->ceilingstat, CEILING_STAT_SLOPE);
|
||||
SET(sectp->ceilingstat, CSTAT_SECTOR_SLOPE);
|
||||
}
|
||||
|
||||
for (zh = sectp->ceilingz; zh < sectp->floorz; zh += Z(60))
|
||||
|
@ -1323,9 +1323,9 @@ void DoChangorMatch(short match)
|
|||
sectp->ceilingheinum += SP_TAG6(sp);
|
||||
|
||||
if (sectp->ceilingheinum)
|
||||
SET(sectp->ceilingstat, CEILING_STAT_SLOPE);
|
||||
SET(sectp->ceilingstat, CSTAT_SECTOR_SLOPE);
|
||||
else
|
||||
RESET(sectp->ceilingstat, CEILING_STAT_SLOPE);
|
||||
RESET(sectp->ceilingstat, CSTAT_SECTOR_SLOPE);
|
||||
|
||||
sectp->ceilingshade += SP_TAG7(sp);
|
||||
sectp->ceilingpal += SP_TAG8(sp);
|
||||
|
@ -1337,9 +1337,9 @@ void DoChangorMatch(short match)
|
|||
sectp->floorheinum += SP_TAG6(sp);
|
||||
|
||||
if (sectp->floorheinum)
|
||||
SET(sectp->floorstat, FLOOR_STAT_SLOPE);
|
||||
SET(sectp->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
else
|
||||
RESET(sectp->floorstat, FLOOR_STAT_SLOPE);
|
||||
RESET(sectp->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
|
||||
sectp->floorshade += SP_TAG7(sp);
|
||||
sectp->floorpal += SP_TAG8(sp);
|
||||
|
@ -2467,7 +2467,7 @@ void DoSineWaveFloor(void)
|
|||
for (swf = &SineWaveFloor[wave][0], flags = swf->flags; swf->sectp != nullptr && swf < &SineWaveFloor[wave][SIZ(SineWaveFloor[wave])]; swf++)
|
||||
{
|
||||
auto sect = swf->sectp;
|
||||
if (!TEST(sect->floorstat, FLOOR_STAT_SLOPE))
|
||||
if (!TEST(sect->floorstat, CSTAT_SECTOR_SLOPE))
|
||||
continue;
|
||||
|
||||
if (TEST(flags, SINE_SLOPED))
|
||||
|
|
|
@ -2003,16 +2003,16 @@ void SpriteSetup(void)
|
|||
if (SP_TAG7(sp) == 0 || SP_TAG7(sp) == 1)
|
||||
{
|
||||
if (SP_TAG3(sp) == 0)
|
||||
SET(sp->sector()->ceilingstat, CEILING_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->ceilingstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN);
|
||||
else
|
||||
SET(sp->sector()->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN);
|
||||
}
|
||||
else if (TEST_BOOL1(sp))
|
||||
{
|
||||
if (SP_TAG3(sp) == 0)
|
||||
SET(sp->sector()->ceilingstat, CEILING_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->ceilingstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN);
|
||||
else
|
||||
SET(sp->sector()->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN);
|
||||
}
|
||||
|
||||
// copy tag 7 to tag 6 and pre-shift it
|
||||
|
@ -2513,17 +2513,17 @@ void SpriteSetup(void)
|
|||
|
||||
SetSectorWallBits(sp->sector(), WALLFX_DONT_STICK, false, true);
|
||||
|
||||
if (TEST(sectp->floorstat, FLOOR_STAT_SLOPE))
|
||||
if (TEST(sectp->floorstat, CSTAT_SECTOR_SLOPE))
|
||||
{
|
||||
SP_TAG5(sp) = sectp->floorheinum;
|
||||
RESET(sectp->floorstat, FLOOR_STAT_SLOPE);
|
||||
RESET(sectp->floorstat, CSTAT_SECTOR_SLOPE);
|
||||
sectp->floorheinum = 0;
|
||||
}
|
||||
|
||||
if (TEST(sectp->ceilingstat, CEILING_STAT_SLOPE))
|
||||
if (TEST(sectp->ceilingstat, CSTAT_SECTOR_SLOPE))
|
||||
{
|
||||
SP_TAG6(sp) = sectp->ceilingheinum;
|
||||
RESET(sectp->ceilingstat, CEILING_STAT_SLOPE);
|
||||
RESET(sectp->ceilingstat, CSTAT_SECTOR_SLOPE);
|
||||
sectp->ceilingheinum = 0;
|
||||
}
|
||||
|
||||
|
@ -2690,7 +2690,6 @@ void SpriteSetup(void)
|
|||
|
||||
case CEILING_Z_ADJUST:
|
||||
{
|
||||
//SET(sp->sector()->ceilingstat, CEILING_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->extra, SECTFX_Z_ADJUST);
|
||||
change_actor_stat(actor, STAT_ST1);
|
||||
break;
|
||||
|
@ -2698,7 +2697,6 @@ void SpriteSetup(void)
|
|||
|
||||
case FLOOR_Z_ADJUST:
|
||||
{
|
||||
//SET(sp->sector()->floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN);
|
||||
SET(sp->sector()->extra, SECTFX_Z_ADJUST);
|
||||
change_actor_stat(actor, STAT_ST1);
|
||||
break;
|
||||
|
@ -6738,7 +6736,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
|||
}
|
||||
}
|
||||
|
||||
if (retval.type != kHitNone && TEST(sp->sector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (retval.type != kHitNone && TEST(sp->sector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (sp->z < sp->sector()->ceilingz)
|
||||
{
|
||||
|
@ -6746,7 +6744,7 @@ Collision move_missile(DSWActor* actor, int xchange, int ychange, int zchange, i
|
|||
}
|
||||
}
|
||||
|
||||
if (retval.type != kHitNone && TEST(sp->sector()->floorstat, FLOOR_STAT_PLAX))
|
||||
if (retval.type != kHitNone && TEST(sp->sector()->floorstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (sp->z > sp->sector()->floorz)
|
||||
{
|
||||
|
|
|
@ -2190,7 +2190,7 @@ void CallbackSOsink(ANIMp ap, void *data)
|
|||
destsect->floorshade = srcsect->floorshade;
|
||||
// destsect->floorz = srcsect->floorz;
|
||||
|
||||
RESET(destsect->floorstat, FLOOR_STAT_RELATIVE);
|
||||
RESET(destsect->floorstat, CSTAT_SECTOR_ALIGN);
|
||||
ASSERT(destsect->hasU() && srcsect->hasU());
|
||||
|
||||
tgt_depth = FixedToInt(srcsect->depth_fixed);
|
||||
|
|
|
@ -4361,7 +4361,7 @@ bool WeaponMoveHit(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
if (TEST(sectp->ceilingstat, CEILING_STAT_PLAX) && sectp->ceilingpicnum != FAF_MIRROR_PIC)
|
||||
if (TEST(sectp->ceilingstat, CSTAT_SECTOR_SKY) && sectp->ceilingpicnum != FAF_MIRROR_PIC)
|
||||
{
|
||||
if (labs(sp->z - sectp->ceilingz) < SPRITEp_SIZE_Z(sp))
|
||||
{
|
||||
|
@ -8388,14 +8388,14 @@ bool SlopeBounce(DSWActor* actor, bool *hit_wall)
|
|||
// detect the ceiling and the hit_wall
|
||||
if (sp->z < DIV2(hiz+loz))
|
||||
{
|
||||
if (!TEST(hit_sector->ceilingstat, CEILING_STAT_SLOPE))
|
||||
if (!TEST(hit_sector->ceilingstat, CSTAT_SECTOR_SLOPE))
|
||||
slope = 0;
|
||||
else
|
||||
slope = hit_sector->ceilingheinum;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!TEST(hit_sector->floorstat, FLOOR_STAT_SLOPE))
|
||||
if (!TEST(hit_sector->floorstat, CSTAT_SECTOR_SLOPE))
|
||||
slope = 0;
|
||||
else
|
||||
slope = hit_sector->floorheinum;
|
||||
|
@ -12606,7 +12606,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -12809,7 +12809,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -13509,7 +13509,7 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang
|
|||
if (labs(hit.hitpos.z - hit.hitSector->ceilingz) <= Z(1))
|
||||
{
|
||||
hit.hitpos.z += Z(16);
|
||||
if (TEST(hit.hitSector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.hitpos.z - hit.hitSector->floorz) <= Z(1))
|
||||
|
@ -13521,7 +13521,7 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -13645,7 +13645,7 @@ int InitShotgun(PLAYERp pp)
|
|||
hit.hitpos.z += Z(16);
|
||||
SET(cstat, CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if (TEST(hit.hitSector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
continue;
|
||||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
|
@ -13676,7 +13676,7 @@ int InitShotgun(PLAYERp pp)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -16208,7 +16208,7 @@ int InitUzi(PLAYERp pp)
|
|||
hit.hitpos.z += Z(16);
|
||||
SET(cstat, CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if (TEST(hit.hitSector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
|
||||
if (SectorIsUnderwaterArea(hit.hitSector))
|
||||
|
@ -16240,7 +16240,7 @@ int InitUzi(PLAYERp pp)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -16751,7 +16751,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp)
|
|||
hit.hitpos.z += Z(16);
|
||||
SET(cstat, CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if (TEST(hit.hitSector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
}
|
||||
else if (labs(hit.hitpos.z - hit.hitSector->floorz) <= Z(1))
|
||||
|
@ -17158,7 +17158,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
hit.hitpos.z += Z(16);
|
||||
SET(cstat, CSTAT_SPRITE_YFLIP);
|
||||
|
||||
if (TEST(hit.hitSector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
continue;
|
||||
}
|
||||
else if (labs(hit.hitpos.z - hit.hitSector->floorz) <= Z(1))
|
||||
|
@ -17176,7 +17176,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -17312,7 +17312,7 @@ int InitEnemyUzi(DSWActor* actor)
|
|||
{
|
||||
if (hit.hitWall->twoSided())
|
||||
{
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(hit.hitWall->nextSector()->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
{
|
||||
if (hit.hitpos.z < hit.hitWall->nextSector()->ceilingz)
|
||||
{
|
||||
|
@ -18175,7 +18175,7 @@ int SpawnSplash(DSWActor* actor)
|
|||
if (sectu && (TEST(sectp->extra, SECTFX_LIQUID_MASK) == SECTFX_LIQUID_NONE))
|
||||
return 0;
|
||||
|
||||
if (sectu && TEST(sectp->floorstat, FLOOR_STAT_PLAX))
|
||||
if (sectu && TEST(sectp->floorstat, CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
|
||||
PlaySound(DIGI_SPLASH1, actor, v3df_none);
|
||||
|
@ -18208,7 +18208,7 @@ int SpawnSplashXY(int hit_x, int hit_y, int hit_z, sectortype* sectp)
|
|||
if (sectp->hasU() && (TEST(sectp->extra, SECTFX_LIQUID_MASK) == SECTFX_LIQUID_NONE))
|
||||
return 0;
|
||||
|
||||
if (sectp->hasU() && TEST(sectp->floorstat, FLOOR_STAT_PLAX))
|
||||
if (sectp->hasU() && TEST(sectp->floorstat, CSTAT_SECTOR_SKY))
|
||||
return 0;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, SPLASH, s_Splash, sectp, hit_x, hit_y, hit_z, 0, 0);
|
||||
|
@ -18759,9 +18759,9 @@ int QueueFootPrint(DSWActor* actor)
|
|||
Found = true;
|
||||
|
||||
// Stupid masked floor stuff! Damn your weirdness!
|
||||
if (TEST(u->PlayerP->cursector->ceilingstat, CEILING_STAT_PLAX))
|
||||
if (TEST(u->PlayerP->cursector->ceilingstat, CSTAT_SECTOR_SKY))
|
||||
Found = true;
|
||||
if (TEST(u->PlayerP->cursector->floorstat, CEILING_STAT_PLAX))
|
||||
if (TEST(u->PlayerP->cursector->floorstat, CSTAT_SECTOR_SKY))
|
||||
Found = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue