mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- gave proper names to ST_160 and ST_161.
This commit is contained in:
parent
ff6a9b89ac
commit
b9caa23357
5 changed files with 18 additions and 15 deletions
|
@ -744,14 +744,14 @@ void movetransports_r(void)
|
|||
|
||||
if (isRRRA())
|
||||
{
|
||||
if (onfloorz && sectlotag == 160 && ps[p].GetActor()->getOffsetZ() > sectp->floorz - 48)
|
||||
if (onfloorz && sectlotag == ST_160_FLOOR_TELEPORT && ps[p].GetActor()->getOffsetZ() > sectp->floorz - 48)
|
||||
{
|
||||
k = 2;
|
||||
ps[p].GetActor()->spr.pos.Z = Owner->sector()->ceilingz + 7 + gs.playerheight;
|
||||
ps[p].GetActor()->backupz();
|
||||
}
|
||||
|
||||
if (onfloorz && sectlotag == 161 && ps[p].GetActor()->getOffsetZ() < sectp->ceilingz + 6)
|
||||
if (onfloorz && sectlotag == ST_161_CEILING_TELEPORT && ps[p].GetActor()->getOffsetZ() < sectp->ceilingz + 6)
|
||||
{
|
||||
k = 2;
|
||||
if (ps[p].GetActor()->spr.extra <= 0) break;
|
||||
|
@ -843,22 +843,22 @@ void movetransports_r(void)
|
|||
|
||||
if (isRRRA())
|
||||
{
|
||||
if (ll && sectlotag == 161 && act2->spr.pos.Z < (sectp->ceilingz + ll) && warpdir == 1)
|
||||
if (ll && sectlotag == ST_161_CEILING_TELEPORT && act2->spr.pos.Z < (sectp->ceilingz + ll) && warpdir == 1)
|
||||
{
|
||||
warpspriteto = 1;
|
||||
ll2 = ll - abs(act2->spr.pos.Z - sectp->ceilingz);
|
||||
}
|
||||
else if (sectlotag == 161 && act2->spr.pos.Z < (sectp->ceilingz + 3.90625) && warpdir == 1)
|
||||
else if (sectlotag == ST_161_CEILING_TELEPORT && act2->spr.pos.Z < (sectp->ceilingz + 3.90625) && warpdir == 1)
|
||||
{
|
||||
warpspriteto = 1;
|
||||
ll2 = zmaptoworld;
|
||||
}
|
||||
if (ll && sectlotag == 160 && act2->spr.pos.Z > (sectp->floorz - ll) && warpdir == 2)
|
||||
if (ll && sectlotag == ST_160_FLOOR_TELEPORT && act2->spr.pos.Z > (sectp->floorz - ll) && warpdir == 2)
|
||||
{
|
||||
warpspriteto = 1;
|
||||
ll2 = ll - abs(sectp->floorz - act2->spr.pos.Z);
|
||||
}
|
||||
else if (sectlotag == 160 && act2->spr.pos.Z > (sectp->floorz - 3.90625) && warpdir == 2)
|
||||
else if (sectlotag == ST_160_FLOOR_TELEPORT && act2->spr.pos.Z > (sectp->floorz - 3.90625) && warpdir == 2)
|
||||
{
|
||||
warpspriteto = 1;
|
||||
ll2 = zmaptoworld;
|
||||
|
@ -888,7 +888,7 @@ void movetransports_r(void)
|
|||
}
|
||||
[[fallthrough]];
|
||||
default:
|
||||
if (act2->spr.statnum == 5 && !(sectlotag == ST_1_ABOVE_WATER || sectlotag == ST_2_UNDERWATER || (isRRRA() && (sectlotag == 160 || sectlotag == 161))))
|
||||
if (act2->spr.statnum == 5 && !(sectlotag == ST_1_ABOVE_WATER || sectlotag == ST_2_UNDERWATER || (isRRRA() && (sectlotag == ST_160_FLOOR_TELEPORT || sectlotag == ST_161_CEILING_TELEPORT))))
|
||||
break;
|
||||
[[fallthrough]];
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
makeitfall(actor);
|
||||
|
||||
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != 160) && actor->spr.pos.Z >= actor->floorz - FOURSLEIGHT_F && actor->spr.yint < 3)
|
||||
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != ST_160_FLOOR_TELEPORT) && actor->spr.pos.Z >= actor->floorz - FOURSLEIGHT_F && actor->spr.yint < 3)
|
||||
{
|
||||
if (actor->spr.yint > 0 || (actor->spr.yint == 0 && actor->floorz == sectp->floorz))
|
||||
{
|
||||
|
@ -1649,7 +1649,7 @@ void moveactors_r(void)
|
|||
break;
|
||||
|
||||
case POWDERKEG:
|
||||
if (!isRRRA() || (sectp->lotag != 1 && sectp->lotag != 160))
|
||||
if (!isRRRA() || (sectp->lotag != ST_1_ABOVE_WATER && sectp->lotag != ST_160_FLOOR_TELEPORT))
|
||||
if (act->vel.X != 0)
|
||||
{
|
||||
movesprite_ex(act, DVector3(act->spr.Angles.Yaw.ToVector()* act->vel.X, act->vel.Z), CLIPMASK0, coll);
|
||||
|
|
|
@ -533,7 +533,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
{
|
||||
double floorz;
|
||||
|
||||
if (isRRRA() && sectp->lotag == 160) continue;
|
||||
if (isRRRA() && sectp->lotag == ST_160_FLOOR_TELEPORT) continue;
|
||||
if ((sectp->lotag & 0xff) > 2 || h->spr.statnum == 4 || h->spr.statnum == 5 || h->spr.picnum == DRONE)
|
||||
floorz = sectp->floorz;
|
||||
else
|
||||
|
|
|
@ -134,6 +134,9 @@ enum
|
|||
|
||||
ST_41_JAILDOOR = 41,
|
||||
ST_42_MINECART = 42,
|
||||
|
||||
ST_160_FLOOR_TELEPORT = 160,
|
||||
ST_161_CEILING_TELEPORT = 161,
|
||||
// left: ST 32767, 65534, 65535
|
||||
};
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ static void shootmelee(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int a
|
|||
|
||||
hitscan(pos, sectp, DVector3(ang.ToVector() * vel, zvel * 64), hit, CLIPMASK1);
|
||||
|
||||
if (isRRRA() && hit.hitSector != nullptr && ((hit.hitSector->lotag == 160 && zvel > 0) || (hit.hitSector->lotag == 161 && zvel < 0))
|
||||
if (isRRRA() && hit.hitSector != nullptr && ((hit.hitSector->lotag == ST_160_FLOOR_TELEPORT && zvel > 0) || (hit.hitSector->lotag == ST_161_CEILING_TELEPORT && zvel < 0))
|
||||
&& hit.actor() == nullptr && hit.hitWall == nullptr)
|
||||
{
|
||||
DukeStatIterator its(STAT_EFFECTOR);
|
||||
|
@ -116,7 +116,7 @@ static void shootmelee(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int a
|
|||
{
|
||||
DVector3 npos;
|
||||
npos.XY() = hit.hitpos.XY() + (effector->GetOwner()->spr.pos.XY() - effector->spr.pos.XY());
|
||||
if (hit.hitSector->lotag == 161)
|
||||
if (hit.hitSector->lotag == ST_161_CEILING_TELEPORT)
|
||||
{
|
||||
npos.Z = effector->GetOwner()->sector()->floorz;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
hitscan(pos, sectp, DVector3(ang.ToVector() * vel, zvel * 64), hit, CLIPMASK1);
|
||||
|
||||
if (isRRRA() && hit.hitSector != nullptr && (((hit.hitSector->lotag == 160 && zvel > 0) || (hit.hitSector->lotag == 161 && zvel < 0))
|
||||
if (isRRRA() && hit.hitSector != nullptr && (((hit.hitSector->lotag == ST_160_FLOOR_TELEPORT && zvel > 0) || (hit.hitSector->lotag == ST_161_CEILING_TELEPORT && zvel < 0))
|
||||
&& hit.actor() == nullptr && hit.hitWall == nullptr))
|
||||
{
|
||||
DukeStatIterator its(STAT_EFFECTOR);
|
||||
|
@ -264,7 +264,7 @@ static void shootweapon(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int
|
|||
{
|
||||
DVector3 npos;
|
||||
npos.XY() = hit.hitpos.XY() + (Owner->spr.pos.XY() - effector->spr.pos.XY());
|
||||
if (hit.hitSector->lotag == 161)
|
||||
if (hit.hitSector->lotag == ST_161_CEILING_TELEPORT)
|
||||
{
|
||||
npos.Z = Owner->sector()->floorz;
|
||||
}
|
||||
|
|
|
@ -886,7 +886,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
{
|
||||
if (wal.twoSided() &&
|
||||
wal.nextSector()->hitag == 0 &&
|
||||
(wal.nextSector()->lotag < 3 || (isRRRA() && wal.nextSector()->lotag == 160)))
|
||||
(wal.nextSector()->lotag < 3 || (isRRRA() && wal.nextSector()->lotag == ST_160_FLOOR_TELEPORT)))
|
||||
{
|
||||
s = wal.nextSector();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue