mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
- use the new RXBUCKET interface for nnext's wind code.
This commit is contained in:
parent
546dee2724
commit
f0c74981fe
2 changed files with 17 additions and 15 deletions
|
@ -1492,7 +1492,7 @@ DBloodActor* getNextIncarnation(DBloodActor* actor)
|
||||||
XSPRITE* pXSprite = &actor->x();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++)
|
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++)
|
||||||
{
|
{
|
||||||
if (rxBucket[i].type != SS_SPRITE) continue;
|
if (!rxBucket[i].isActor()) continue;
|
||||||
auto rxactor = rxBucket[i].actor();
|
auto rxactor = rxBucket[i].actor();
|
||||||
if (actor != rxactor && rxactor->s().statnum == kStatInactive) return rxactor;
|
if (actor != rxactor && rxactor->s().statnum == kStatInactive) return rxactor;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1157,13 +1157,12 @@ void nnExtProcessSuperSprites()
|
||||||
rx = pXWind->txID;
|
rx = pXWind->txID;
|
||||||
for (j = bucketHead[rx]; j < bucketHead[rx + 1]; j++)
|
for (j = bucketHead[rx]; j < bucketHead[rx + 1]; j++)
|
||||||
{
|
{
|
||||||
if (rxBucket[j].type != OBJ_SECTOR)
|
if (!rxBucket[j].isSector()) continue;
|
||||||
continue;
|
auto pSector = rxBucket[j].sector();
|
||||||
|
XSECTOR* pXSector = &pSector->xs();
|
||||||
|
|
||||||
int index = rxBucket[j].rxindex;
|
|
||||||
XSECTOR* pXSector = §or[index].xs();
|
|
||||||
if ((!pXSector->locked) && (fWindAlways || pXSector->windAlways || pXSector->busy))
|
if ((!pXSector->locked) && (fWindAlways || pXSector->windAlways || pXSector->busy))
|
||||||
windGenDoVerticalWind(pXWind->sysData2, index);
|
windGenDoVerticalWind(pXWind->sysData2, sectnum(pSector));
|
||||||
}
|
}
|
||||||
|
|
||||||
DBloodActor* pXRedir = nullptr; // check redirected TX buckets
|
DBloodActor* pXRedir = nullptr; // check redirected TX buckets
|
||||||
|
@ -1171,13 +1170,12 @@ void nnExtProcessSuperSprites()
|
||||||
{
|
{
|
||||||
for (j = bucketHead[rx]; j < bucketHead[rx + 1]; j++)
|
for (j = bucketHead[rx]; j < bucketHead[rx + 1]; j++)
|
||||||
{
|
{
|
||||||
if (rxBucket[j].type != OBJ_SECTOR)
|
if (!rxBucket[j].isSector()) continue;
|
||||||
continue;
|
auto pSector = rxBucket[j].sector();
|
||||||
|
XSECTOR* pXSector = &pSector->xs();
|
||||||
|
|
||||||
int index = rxBucket[j].rxindex;
|
|
||||||
XSECTOR* pXSector = §or[index].xs();
|
|
||||||
if ((!pXSector->locked) && (fWindAlways || pXSector->windAlways || pXSector->busy))
|
if ((!pXSector->locked) && (fWindAlways || pXSector->windAlways || pXSector->busy))
|
||||||
windGenDoVerticalWind(pXWind->sysData2, index);
|
windGenDoVerticalWind(pXWind->sysData2, sectnum(pSector));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1976,8 +1974,10 @@ void windGenStopWindOnSectors(DBloodActor* sourceactor)
|
||||||
|
|
||||||
for (int i = bucketHead[pXSource->txID]; i < bucketHead[pXSource->txID + 1]; i++)
|
for (int i = bucketHead[pXSource->txID]; i < bucketHead[pXSource->txID + 1]; i++)
|
||||||
{
|
{
|
||||||
if (rxBucket[i].type != OBJ_SECTOR) continue;
|
if (!rxBucket[i].isSector()) continue;
|
||||||
XSECTOR* pXSector = §or[rxBucket[i].rxindex].xs();
|
auto pSector = rxBucket[i].sector();
|
||||||
|
XSECTOR* pXSector = &pSector->xs();
|
||||||
|
|
||||||
if ((pXSector->state == 1 && !pXSector->windAlways)
|
if ((pXSector->state == 1 && !pXSector->windAlways)
|
||||||
|| ((pSource->flags & kModernTypeFlag1) && !(pSource->flags & kModernTypeFlag2)))
|
|| ((pSource->flags & kModernTypeFlag1) && !(pSource->flags & kModernTypeFlag2)))
|
||||||
{
|
{
|
||||||
|
@ -1992,8 +1992,10 @@ void windGenStopWindOnSectors(DBloodActor* sourceactor)
|
||||||
{
|
{
|
||||||
for (int i = bucketHead[rx]; i < bucketHead[rx + 1]; i++)
|
for (int i = bucketHead[rx]; i < bucketHead[rx + 1]; i++)
|
||||||
{
|
{
|
||||||
if (rxBucket[i].type != OBJ_SECTOR) continue;
|
if (!rxBucket[i].isSector()) continue;
|
||||||
XSECTOR* pXSector = §or[rxBucket[i].rxindex].xs();
|
auto pSector = rxBucket[i].sector();
|
||||||
|
XSECTOR* pXSector = &pSector->xs();
|
||||||
|
|
||||||
if ((pXSector->state == 1 && !pXSector->windAlways) || (pSource->flags & kModernTypeFlag2))
|
if ((pXSector->state == 1 && !pXSector->windAlways) || (pSource->flags & kModernTypeFlag2))
|
||||||
pXSector->windVel = 0;
|
pXSector->windVel = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue