mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-18 18:01:33 +00:00
- cleaned up all -> accesses through firstWall().
This commit is contained in:
parent
af60408e63
commit
5798fa067f
11 changed files with 21 additions and 21 deletions
|
@ -480,7 +480,7 @@ int HWLinePortal::ClipSector(sectortype *sub)
|
|||
// this seg is completely behind the mirror
|
||||
for (unsigned i = 0; i<sub->walls.Size(); i++)
|
||||
{
|
||||
if (PointOnLineSide(sub->firstWall()->pos, line) == 0) return PClip_Inside;
|
||||
if (PointOnLineSide(sub->walls[0].pos, line) == 0) return PClip_Inside;
|
||||
}
|
||||
return PClip_InFront;
|
||||
}
|
||||
|
|
|
@ -369,8 +369,8 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
|||
((sec->floorstat ^ compare->floorstat) & (CSTAT_SECTOR_ALIGN | CSTAT_SECTOR_YFLIP | CSTAT_SECTOR_XFLIP | CSTAT_SECTOR_TEXHALF | CSTAT_SECTOR_SWAPXY)) == 0 &&
|
||||
sec->floorxpan_ == compare->floorxpan_ &&
|
||||
sec->floorypan_ == compare->floorypan_ &&
|
||||
sec->firstWall()->pos == sdata.poscompare[0] &&
|
||||
sec->firstWall()->point2Wall()->pos == sdata.poscompare2[0] &&
|
||||
sec->walls[0].pos == sdata.poscompare[0] &&
|
||||
sec->walls[0].point2Wall()->pos == sdata.poscompare2[0] &&
|
||||
!(section->dirty & EDirty::FloorDirty) && sdata.planes[plane].vertices.Size() ) return true;
|
||||
|
||||
section->dirty &= ~EDirty::FloorDirty;
|
||||
|
@ -382,15 +382,15 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
|||
((sec->ceilingstat ^ compare->ceilingstat) & (CSTAT_SECTOR_ALIGN | CSTAT_SECTOR_YFLIP | CSTAT_SECTOR_XFLIP | CSTAT_SECTOR_TEXHALF | CSTAT_SECTOR_SWAPXY)) == 0 &&
|
||||
sec->ceilingxpan_ == compare->ceilingxpan_ &&
|
||||
sec->ceilingypan_ == compare->ceilingypan_ &&
|
||||
sec->firstWall()->pos == sdata.poscompare[1] &&
|
||||
sec->firstWall()->point2Wall()->pos == sdata.poscompare2[1] &&
|
||||
sec->walls[0].pos == sdata.poscompare[1] &&
|
||||
sec->walls[0].point2Wall()->pos == sdata.poscompare2[1] &&
|
||||
!(section->dirty & EDirty::CeilingDirty) && sdata.planes[1].vertices.Size()) return true;
|
||||
|
||||
section->dirty &= ~EDirty::CeilingDirty;
|
||||
}
|
||||
compare->copy(sec);
|
||||
sdata.poscompare[plane] = sec->firstWall()->pos;
|
||||
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->pos;
|
||||
sdata.poscompare[plane] = sec->walls[0].pos;
|
||||
sdata.poscompare2[plane] = sec->walls[0].point2Wall()->pos;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2611,7 +2611,7 @@ DVector4 actFloorBounceVector(DBloodActor* actor, double oldz, sectortype* pSect
|
|||
}
|
||||
|
||||
DVector3 p(actor->vel.XY(), oldz);
|
||||
DAngle angle = pSector->firstWall()->delta().Angle() + DAngle90;
|
||||
DAngle angle = pSector->walls[0].delta().Angle() + DAngle90;
|
||||
auto t2 = pSector->floorheinum * (1. / SLOPEVAL_FACTOR);
|
||||
auto t3 = DVector2(-1, t2).Length();
|
||||
auto t4 = DVector3(angle.ToVector() * (t2 / t3), -1 / t3);
|
||||
|
@ -5631,7 +5631,7 @@ static void actCheckThings()
|
|||
speed = pXSector->panVel / 128.;
|
||||
if (!pXSector->panAlways && pXSector->busy) speed *= FixedToFloat(pXSector->busy);
|
||||
}
|
||||
if (pSector->floorstat & CSTAT_SECTOR_ALIGN) angle += pSector->firstWall()->normalAngle();
|
||||
if (pSector->floorstat & CSTAT_SECTOR_ALIGN) angle += pSector->walls[0].normalAngle();
|
||||
|
||||
actor->vel += angle.ToVector() * speed;
|
||||
}
|
||||
|
@ -6044,7 +6044,7 @@ static void actCheckDudes()
|
|||
speed *= FixedToFloat(pXSector->busy);
|
||||
}
|
||||
if (pSector->floorstat & CSTAT_SECTOR_ALIGN)
|
||||
angle += pSector->firstWall()->normalAngle();
|
||||
angle += pSector->walls[0].normalAngle();
|
||||
actor->vel += angle.ToVector() * speed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1307,7 +1307,7 @@ void nnExtProcessSuperSprites()
|
|||
speed *= FixedToFloat(pXSector->busy);
|
||||
}
|
||||
if (debrisactor->sector()->floorstat & CSTAT_SECTOR_ALIGN)
|
||||
angle += debrisactor->sector()->firstWall()->normalAngle();
|
||||
angle += debrisactor->sector()->walls[0].normalAngle();
|
||||
debrisactor->vel += angle.ToVector() * speed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -988,7 +988,7 @@ void bounce(DDukeActor* actor)
|
|||
|
||||
auto sectp = actor->sector();
|
||||
|
||||
DAngle daang = sectp->firstWall()->delta().Angle();
|
||||
DAngle daang = sectp->walls[0].delta().Angle();
|
||||
|
||||
double k;
|
||||
if (actor->spr.pos.Z < (actor->floorz + actor->ceilingz) * 0.5)
|
||||
|
|
|
@ -3467,7 +3467,7 @@ void moveeffectors_d(void) //STATNUM 3
|
|||
if (act->spr.lotag != SE_29_WAVES) continue;
|
||||
auto sc = act->sector();
|
||||
if (sc->walls.Size() != 4) continue;
|
||||
auto wal = sc->firstWall() + 2;
|
||||
auto wal = &sc->walls[2];
|
||||
if (wal->nextSector()) alignflorslope(act->sector(), DVector3(wal->pos, wal->nextSector()->floorz));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -738,7 +738,7 @@ void prelevel_common(int g)
|
|||
|
||||
if (sectp->lotag == -1)
|
||||
{
|
||||
ps[0].Exit = sectp->firstWall()->pos;
|
||||
ps[0].Exit = sectp->walls[0].pos;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1633,7 +1633,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
|
|||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
pActor->spr.pos.Z = pSector->firstWall()->nextSector()->floorz;
|
||||
pActor->spr.pos.Z = pSector->walls[0].nextSector()->floorz;
|
||||
|
||||
// CHECKME - name of this variable?
|
||||
int nRepeat = int(pActor->spr.pos.Z - pSector->floorz);
|
||||
|
@ -2602,8 +2602,8 @@ void PostProcess()
|
|||
|
||||
if (§ != §j && sectj.Speed && !(sect.Flag & kSectLava))
|
||||
{
|
||||
double xVal = abs(sect.firstWall()->pos.X - sectj.firstWall()->pos.X);
|
||||
double yVal = abs(sect.firstWall()->pos.Y - sectj.firstWall()->pos.Y);
|
||||
double xVal = abs(sect.walls[0].pos.X - sectj.walls[0].pos.X);
|
||||
double yVal = abs(sect.walls[0].pos.Y - sectj.walls[0].pos.Y);
|
||||
|
||||
if (xVal < 15000/16. && yVal < 15000/16. && (xVal + yVal < maxval))
|
||||
{
|
||||
|
|
|
@ -1670,7 +1670,7 @@ void SlipSlope(PLAYER* pp)
|
|||
if (!(sectu->flags & SECTFU_SLIDE_SECTOR) || !(pp->cursector->floorstat & CSTAT_SECTOR_SLOPE))
|
||||
return;
|
||||
|
||||
DAngle ang = pp->cursector->firstWall()->delta().Angle() + DAngle90;
|
||||
DAngle ang = pp->cursector->walls[0].delta().Angle() + DAngle90;
|
||||
|
||||
pp->vect += ang.ToVector() * pp->cursector->floorheinum / (1 << (sectu->speed + 4)); // todo confirm scale
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ void FAFhitscan(const DVector3& start, sectortype* sect, const DVector3& vect, H
|
|||
{
|
||||
if ((hit.hitSector->extra & SECTFX_WARP_SECTOR))
|
||||
{
|
||||
if ((hit.hitSector->firstWall()->cstat & CSTAT_WALL_WARP_HITSCAN))
|
||||
if ((hit.hitSector->walls[0].cstat & CSTAT_WALL_WARP_HITSCAN))
|
||||
{
|
||||
// hit the floor of a sector that is a warping sector
|
||||
sectortype* newsect = nullptr;
|
||||
|
|
|
@ -1685,10 +1685,10 @@ PlayerPart:
|
|||
|
||||
// IS part of a sector, sprite can do things based on the
|
||||
// current sector it is in
|
||||
if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_DONT_SPIN))
|
||||
if ((actor->sector()->walls[0].extra & WALLFX_LOOP_DONT_SPIN))
|
||||
continue;
|
||||
|
||||
if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_REVERSE_SPIN))
|
||||
if ((actor->sector()->walls[0].extra & WALLFX_LOOP_REVERSE_SPIN))
|
||||
{
|
||||
actor->spr.pos.XY() = rotatepoint(sop->pmid.XY(), actor->spr.pos.XY(), -deltaangle);
|
||||
actor->spr.angle -= deltaangle;
|
||||
|
|
Loading…
Reference in a new issue