mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- smaller stuff
This commit is contained in:
parent
4438c20cb4
commit
36d66f14b5
3 changed files with 18 additions and 18 deletions
|
@ -588,15 +588,15 @@ void GetZRange(DBloodActor *actor, int *ceilZ, Collision *ceilColl, int *floorZ,
|
|||
floorColl->setFromEngine(floorHit);
|
||||
if (floorColl->type == kHitSector)
|
||||
{
|
||||
int nSector = floorColl->index;
|
||||
if ((nClipParallax & PARALLAXCLIP_FLOOR) == 0 && (sector[nSector].floorstat & 1))
|
||||
auto pSector = floorColl->sector();
|
||||
if ((nClipParallax & PARALLAXCLIP_FLOOR) == 0 && (pSector->floorstat & 1))
|
||||
*floorZ = 0x7fffffff;
|
||||
if (sector[nSector].hasX())
|
||||
if (pSector->hasX())
|
||||
{
|
||||
XSECTOR *pXSector = §or[nSector].xs();
|
||||
XSECTOR *pXSector = &pSector->xs();
|
||||
*floorZ += pXSector->Depth << 10;
|
||||
}
|
||||
auto actor = getUpperLink(nSector);
|
||||
auto actor = pSector->upperLink;
|
||||
if (actor)
|
||||
{
|
||||
auto link = actor->GetOwner();
|
||||
|
@ -608,10 +608,10 @@ void GetZRange(DBloodActor *actor, int *ceilZ, Collision *ceilColl, int *floorZ,
|
|||
}
|
||||
if (ceilColl->type == kHitSector)
|
||||
{
|
||||
int nSector = ceilColl->index;
|
||||
if ((nClipParallax & PARALLAXCLIP_CEILING) == 0 && (sector[nSector].ceilingstat & 1))
|
||||
auto pSector = ceilColl->sector();
|
||||
if ((nClipParallax & PARALLAXCLIP_CEILING) == 0 && (pSector->ceilingstat & 1))
|
||||
*ceilZ = 0x80000000;
|
||||
auto actor = getLowerLink(nSector);
|
||||
auto actor = pSector->lowerLink;
|
||||
if (actor)
|
||||
{
|
||||
auto link = actor->GetOwner();
|
||||
|
|
|
@ -110,7 +110,8 @@ void InitMirrors(void)
|
|||
if (mirrorcnt >= 15)
|
||||
break;
|
||||
|
||||
if (sector[i].floorpicnum == 504)
|
||||
auto secti = §or[i];
|
||||
if (secti->floorpicnum == 504)
|
||||
{
|
||||
auto link = getUpperLink(i);
|
||||
if (link == nullptr)
|
||||
|
@ -119,7 +120,6 @@ void InitMirrors(void)
|
|||
if (link2 == nullptr)
|
||||
continue;
|
||||
|
||||
auto secti = §or[i];
|
||||
int j = link2->s().sectnum;
|
||||
auto sectj = link2->s().sector();
|
||||
if (sectj->ceilingpicnum != 504)
|
||||
|
|
|
@ -1318,7 +1318,7 @@ void nnExtProcessSuperSprites()
|
|||
continue;
|
||||
}
|
||||
|
||||
XSECTOR* pXSector = (sector[pDebris->sectnum].hasX()) ? §or[pDebris->sectnum].xs() : nullptr;
|
||||
XSECTOR* pXSector = (pDebris->sector()->hasX()) ? &pDebris->sector()->xs() : nullptr;
|
||||
viewBackupSpriteLoc(debrisactor);
|
||||
|
||||
bool uwater = false;
|
||||
|
@ -1340,8 +1340,8 @@ void nnExtProcessSuperSprites()
|
|||
if (!pXSector->panAlways && pXSector->busy)
|
||||
speed = MulScale(speed, pXSector->busy, 16);
|
||||
}
|
||||
if (sector[pDebris->sectnum].floorstat & 64)
|
||||
angle = (angle + GetWallAngle(sector[pDebris->sectnum].firstWall()) + 512) & 2047;
|
||||
if (pDebris->sector()->floorstat & 64)
|
||||
angle = (angle + GetWallAngle(pDebris->sector()->firstWall()) + 512) & 2047;
|
||||
int dx = MulScale(speed, Cos(angle), 30);
|
||||
int dy = MulScale(speed, Sin(angle), 30);
|
||||
debrisactor->xvel += dx;
|
||||
|
@ -1395,13 +1395,13 @@ void nnExtProcessSuperSprites()
|
|||
if (ang < pXDebris->goalAng) pDebris->ang = ClipHigh(ang + angStep, pXDebris->goalAng);
|
||||
else if (ang > pXDebris->goalAng) pDebris->ang = ClipLow(ang - angStep, pXDebris->goalAng);
|
||||
|
||||
int nSector = pDebris->sectnum;
|
||||
int cz = getceilzofslope(nSector, pDebris->x, pDebris->y);
|
||||
int fz = getflorzofslope(nSector, pDebris->x, pDebris->y);
|
||||
auto pSector = pDebris->sector();
|
||||
int cz = getceilzofslopeptr(pSector, pDebris->x, pDebris->y);
|
||||
int fz = getflorzofslopeptr(pSector, pDebris->x, pDebris->y);
|
||||
|
||||
GetActorExtents(debrisactor, &top, &bottom);
|
||||
if (fz >= bottom && getLowerLink(nSector) == nullptr && !(sector[nSector].ceilingstat & 0x1)) pDebris->z += ClipLow(cz - top, 0);
|
||||
if (cz <= top && getUpperLink(nSector) == nullptr && !(sector[nSector].floorstat & 0x1)) pDebris->z += ClipHigh(fz - bottom, 0);
|
||||
if (fz >= bottom && pSector->lowerLink == nullptr && !(pSector->ceilingstat & 0x1)) pDebris->z += ClipLow(cz - top, 0);
|
||||
if (cz <= top && pSector->upperLink == nullptr && !(pSector->floorstat & 0x1)) pDebris->z += ClipHigh(fz - bottom, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue