From 143e9478394f95777a6f1a6fbc3c2be121ebf60d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 1 Sep 2021 21:53:51 +0200 Subject: [PATCH] - renamed variable for consistency. --- source/games/blood/src/nnexts.cpp | 32 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/source/games/blood/src/nnexts.cpp b/source/games/blood/src/nnexts.cpp index 6a13a9c03..48ad155a5 100644 --- a/source/games/blood/src/nnexts.cpp +++ b/source/games/blood/src/nnexts.cpp @@ -1550,7 +1550,7 @@ void debrisBubble(int nSprite) void debrisMove(int listIndex) { auto actor = gPhysSpritesList[listIndex]; - XSPRITE* pXDebris = &actor->x(); + XSPRITE* pXSprite = &actor->x(); spritetype* pSprite = &actor->s(); int nSector = pSprite->sectnum; @@ -1629,7 +1629,7 @@ void debrisMove(int listIndex) GetZRange(pSprite, &ceilZ, &ceilHit, &floorZ, &floorHit, clipDist, CLIPMASK0, PARALLAXCLIP_CEILING | PARALLAXCLIP_FLOOR); GetSpriteExtents(pSprite, &top, &bottom); - if ((pXDebris->physAttr & kPhysDebrisSwim) && uwater) { + if ((pXSprite->physAttr & kPhysDebrisSwim) && uwater) { int vc = 0; int cz = getceilzofslope(nSector, pSprite->x, pSprite->y); @@ -1637,7 +1637,7 @@ void debrisMove(int listIndex) int div = ClipLow(bottom - top, 1); if (gLowerLink[nSector] >= 0) cz += (cz < 0) ? 0x500 : -0x500; - if (top > cz && (!(pXDebris->physAttr & kPhysDebrisFloat) || fz <= bottom << 2)) + if (top > cz && (!(pXSprite->physAttr & kPhysDebrisFloat) || fz <= bottom << 2)) zvel[nSprite] -= DivScale((bottom - ceilZ) >> 6, mass, 8); if (fz < bottom) @@ -1648,7 +1648,7 @@ void debrisMove(int listIndex) zvel[nSprite] += vc; } - } else if ((pXDebris->physAttr & kPhysGravity) && bottom < floorZ) { + } else if ((pXSprite->physAttr & kPhysGravity) && bottom < floorZ) { pSprite->z += 455; zvel[nSprite] += 58254; @@ -1686,13 +1686,13 @@ void debrisMove(int listIndex) if (v30 > 0) { - pXDebris->physAttr |= kPhysFalling; + pXSprite->physAttr |= kPhysFalling; actFloorBounceVector((int*)&xvel[nSprite], (int*)&yvel[nSprite], (int*)&v30, pSprite->sectnum, tmpFraction); zvel[nSprite] = v30; if (abs(zvel[nSprite]) < 0x10000) { zvel[nSprite] = velFloor[pSprite->sectnum]; - pXDebris->physAttr &= ~kPhysFalling; + pXSprite->physAttr &= ~kPhysFalling; } moveHit = floorHit; @@ -1714,15 +1714,15 @@ void debrisMove(int listIndex) } else if (zvel[nSprite] == 0) { - pXDebris->physAttr &= ~kPhysFalling; + pXSprite->physAttr &= ~kPhysFalling; } } else { gSpriteHit[nXSprite].florhit = 0; - if (pXDebris->physAttr & kPhysGravity) - pXDebris->physAttr |= kPhysFalling; + if (pXSprite->physAttr & kPhysGravity) + pXSprite->physAttr |= kPhysFalling; } @@ -1730,7 +1730,7 @@ void debrisMove(int listIndex) gSpriteHit[nXSprite].ceilhit = moveHit = ceilHit; pSprite->z += ClipLow(ceilZ - top, 0); - if (zvel[nSprite] <= 0 && (pXDebris->physAttr & kPhysFalling)) + if (zvel[nSprite] <= 0 && (pXSprite->physAttr & kPhysFalling)) zvel[nSprite] = MulScale(-zvel[nSprite], 0x2000, 16); } else { @@ -1740,11 +1740,11 @@ void debrisMove(int listIndex) } - if (moveHit && pXDebris->Impact && !pXDebris->locked && !pXDebris->isTriggered && (pXDebris->state == pXDebris->restState || pXDebris->Interrutable)) { + if (moveHit && pXSprite->Impact && !pXSprite->locked && !pXSprite->isTriggered && (pXSprite->state == pXSprite->restState || pXSprite->Interrutable)) { if (pSprite->type >= kThingBase && pSprite->type < kThingMax) changespritestat(nSprite, kStatThing); - trTriggerSprite(pSprite->index, pXDebris, kCmdToggle); + trTriggerSprite(pSprite->index, pXSprite, kCmdToggle); } @@ -1759,13 +1759,13 @@ void debrisMove(int listIndex) } } - pXDebris->height = ClipLow(floorZ - bottom, 0) >> 8; - if (uwater || pXDebris->height >= 0x100) + pXSprite->height = ClipLow(floorZ - bottom, 0) >> 8; + if (uwater || pXSprite->height >= 0x100) return; int nDrag = 0x2a00; - if (pXDebris->height > 0) - nDrag -= scale(nDrag, pXDebris->height, 0x100); + if (pXSprite->height > 0) + nDrag -= scale(nDrag, pXSprite->height, 0x100); xvel[nSprite] -= mulscale16r(xvel[nSprite], nDrag); yvel[nSprite] -= mulscale16r(yvel[nSprite], nDrag);