mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- trInit
This commit is contained in:
parent
7442edc59f
commit
0797e7ac90
1 changed files with 8 additions and 10 deletions
|
@ -1588,13 +1588,12 @@ void OperateSector(sectortype* pSector, EVENT event)
|
|||
}
|
||||
}
|
||||
|
||||
void InitPath(unsigned int nSector, XSECTOR *pXSector)
|
||||
void InitPath(sectortype* pSector, XSECTOR *pXSector)
|
||||
{
|
||||
sectortype* pSector = §or[nSector];
|
||||
DBloodActor* actor = nullptr;
|
||||
spritetype *pSprite = nullptr;
|
||||
XSPRITE *pXSprite;
|
||||
assert(nSector < (unsigned int)numsectors);
|
||||
assert(pSector);
|
||||
int nId = pXSector->data;
|
||||
|
||||
BloodStatIterator it(kStatPathMarker);
|
||||
|
@ -1610,8 +1609,7 @@ void InitPath(unsigned int nSector, XSECTOR *pXSector)
|
|||
}
|
||||
|
||||
if (pSprite == nullptr) {
|
||||
//I_Error("Unable to find path marker with id #%d", nId);
|
||||
viewSetSystemMessage("Unable to find path marker with id #%d for path sector #%d", nId, nSector);
|
||||
viewSetSystemMessage("Unable to find path marker with id #%d for path sector", nId);
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -2000,9 +1998,9 @@ void trInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < numsectors; i++)
|
||||
for(auto& sect : sectors())
|
||||
{
|
||||
sectortype *pSector = §or[i];
|
||||
sectortype *pSector = §
|
||||
pSector->baseFloor = pSector->floorz;
|
||||
pSector->baseCeil = pSector->ceilingz;
|
||||
if (pSector->hasX())
|
||||
|
@ -2036,7 +2034,7 @@ void trInit(void)
|
|||
wal.baseWall.x = wal.x;
|
||||
wal.baseWall.y = wal.y;
|
||||
}
|
||||
BloodSectIterator it(i);
|
||||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
actor->basePoint = actor->s().pos;
|
||||
|
@ -2055,7 +2053,7 @@ void trInit(void)
|
|||
wal.baseWall.x = wal.x;
|
||||
wal.baseWall.y = wal.y;
|
||||
}
|
||||
BloodSectIterator it(i);
|
||||
BloodSectIterator it(pSector);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
actor->basePoint = actor->s().pos;
|
||||
|
@ -2065,7 +2063,7 @@ void trInit(void)
|
|||
break;
|
||||
}
|
||||
case kSectorPath:
|
||||
InitPath(i, pXSector);
|
||||
InitPath(pSector, pXSector);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue