mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- flag combo stuff.
This commit is contained in:
parent
b263c3ac6b
commit
adbf5177a7
7 changed files with 18 additions and 17 deletions
|
@ -501,7 +501,7 @@ int cansee(int x1, int y1, int z1, sectortype* sect1, int x2, int y2, int z2, se
|
|||
}
|
||||
|
||||
|
||||
if (!wal->twoSided() || wal->cstat&32)
|
||||
if (!wal->twoSided() || wal->cstat & CSTAT_WALL_1WAY)
|
||||
return 0;
|
||||
|
||||
t = DivScale(t,bot, 24);
|
||||
|
|
|
@ -301,8 +301,9 @@ void MarkSectorSeen(sectortype* sec)
|
|||
for (auto& wal : wallsofsector(sec))
|
||||
{
|
||||
if (!wal.twoSided()) continue;
|
||||
if (wal.cstat & 0x0071) continue;
|
||||
if (wal.nextWall()->cstat & 0x0071) continue;
|
||||
const auto bits = (CSTAT_WALL_BLOCK | CSTAT_WALL_MASKED | CSTAT_WALL_1WAY | CSTAT_WALL_BLOCK_HITSCAN);
|
||||
if (wal.cstat & bits) continue;
|
||||
if (wal.nextWall()->cstat & bits) continue;
|
||||
auto osec = wal.nextSector();
|
||||
if (osec->lotag == 32767) continue;
|
||||
if (osec->ceilingz >= osec->floorz) continue;
|
||||
|
@ -390,7 +391,7 @@ bool ShowRedLine(int j, int i)
|
|||
{
|
||||
if (sector[i].floorz != sector[i].ceilingz)
|
||||
if (wal->nextSector()->floorz != wal->nextSector()->ceilingz)
|
||||
if (((wal->cstat | wal->nextWall()->cstat) & (16 + 32)) == 0)
|
||||
if (((wal->cstat | wal->nextWall()->cstat) & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)) == 0)
|
||||
if (sector[i].floorz == wal->nextSector()->floorz)
|
||||
return false;
|
||||
if (sector[i].floorpicnum != wal->nextSector()->floorpicnum)
|
||||
|
@ -429,7 +430,7 @@ void drawredlines(int cposx, int cposy, int czoom, int cang)
|
|||
auto osec = wal.nextSector();
|
||||
|
||||
if (osec->ceilingz == z1 && osec->floorz == z2)
|
||||
if (((wal.cstat | wal.nextWall()->cstat) & (16 + 32)) == 0) continue;
|
||||
if (((wal.cstat | wal.nextWall()->cstat) & (CSTAT_WALL_MASKED | CSTAT_WALL_1WAY)) == 0) continue;
|
||||
|
||||
if (ShowRedLine(wallnum(&wal), i))
|
||||
{
|
||||
|
|
|
@ -4141,13 +4141,13 @@ void handle_se19(DDukeActor *actor, int BIGFORCE)
|
|||
{
|
||||
if (wal.overpicnum == BIGFORCE)
|
||||
{
|
||||
wal.cstat &= (128 + 32 + 8 + 4 + 2);
|
||||
wal.cstat &= (CSTAT_WALL_TRANSLUCENT | CSTAT_WALL_1WAY | CSTAT_WALL_XFLIP | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_BOTTOM_SWAP);
|
||||
wal.overpicnum = 0;
|
||||
auto nextwal = wal.nextWall();
|
||||
if (nextwal != nullptr)
|
||||
{
|
||||
nextwal->overpicnum = 0;
|
||||
nextwal->cstat &= (128 + 32 + 8 + 4 + 2);
|
||||
nextwal->cstat &= (CSTAT_WALL_TRANSLUCENT | CSTAT_WALL_1WAY | CSTAT_WALL_XFLIP | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_BOTTOM_SWAP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4707,12 +4707,12 @@ void handle_se128(DDukeActor *actor)
|
|||
|
||||
//if (wal->cstat | 32) // this has always been bugged, the condition can never be false.
|
||||
{
|
||||
wal->cstat &= (255 - 32);
|
||||
wal->cstat |= 16;
|
||||
wal->cstat &= ~CSTAT_WALL_1WAY;
|
||||
wal->cstat |= CSTAT_WALL_MASKED;
|
||||
if (wal->twoSided())
|
||||
{
|
||||
wal->nextWall()->cstat &= (255 - 32);
|
||||
wal->nextWall()->cstat |= 16;
|
||||
wal->nextWall()->cstat &= ~CSTAT_WALL_1WAY;
|
||||
wal->nextWall()->cstat |= CSTAT_WALL_MASKED;
|
||||
}
|
||||
}
|
||||
// else return;
|
||||
|
@ -4725,9 +4725,9 @@ void handle_se128(DDukeActor *actor)
|
|||
if (t[0] < t[1]) t[0]++;
|
||||
else
|
||||
{
|
||||
wal->cstat &= (128 + 32 + 8 + 4 + 2);
|
||||
wal->cstat &= (CSTAT_WALL_TRANSLUCENT | CSTAT_WALL_1WAY | CSTAT_WALL_XFLIP | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_BOTTOM_SWAP);
|
||||
if (nextwal)
|
||||
nextwal->cstat &= (128 + 32 + 8 + 4 + 2);
|
||||
nextwal->cstat &= (CSTAT_WALL_TRANSLUCENT | CSTAT_WALL_1WAY | CSTAT_WALL_XFLIP | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_BOTTOM_SWAP);
|
||||
deletesprite(actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -423,7 +423,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
|
|||
case W_FORCEFIELD + 2:
|
||||
if (wal.shade > 31)
|
||||
wal.cstat = 0;
|
||||
else wal.cstat |= 85 + 256;
|
||||
else wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN | CSTAT_WALL_YFLIP;
|
||||
|
||||
if (wal.lotag && wal.twoSided())
|
||||
wal.nextWall()->lotag = wal.lotag;
|
||||
|
|
|
@ -1207,7 +1207,7 @@ void operateforcefields_common(DDukeActor *effector, int low, const std::initial
|
|||
wal->lotag = 0;
|
||||
}
|
||||
else
|
||||
wal->cstat = 85;
|
||||
wal->cstat = (CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -918,7 +918,7 @@ void checkplayerhurt_d(struct player_struct* p, const Collision& coll)
|
|||
auto wal = coll.hitWall;
|
||||
|
||||
if (p->hurt_delay > 0) p->hurt_delay--;
|
||||
else if (wal->cstat & 85) switch (wal->overpicnum)
|
||||
else if (wal->cstat & (CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN)) switch (wal->overpicnum)
|
||||
{
|
||||
case W_FORCEFIELD:
|
||||
case W_FORCEFIELD + 1:
|
||||
|
|
|
@ -1421,7 +1421,7 @@ void checkplayerhurt_r(struct player_struct* p, const Collision &coll)
|
|||
auto wal = coll.hitWall;
|
||||
|
||||
if (p->hurt_delay > 0) p->hurt_delay--;
|
||||
else if (wal->cstat & 85) switch (wal->overpicnum)
|
||||
else if (wal->cstat & (CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN)) switch (wal->overpicnum)
|
||||
{
|
||||
case BIGFORCE:
|
||||
p->hurt_delay = 26;
|
||||
|
|
Loading…
Reference in a new issue