mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- evrListRedirectors
The wall/sector parts of this look currently unused,
This commit is contained in:
parent
b23a2865b8
commit
db9d12d19f
2 changed files with 17 additions and 11 deletions
|
@ -4873,7 +4873,7 @@ void modernTypeTrigger(int destObjType, int destObjIndex, DBloodActor* destactor
|
||||||
// change sector lighting dynamically
|
// change sector lighting dynamically
|
||||||
case kModernSectorFXChanger:
|
case kModernSectorFXChanger:
|
||||||
if (destObjType != OBJ_SECTOR) break;
|
if (destObjType != OBJ_SECTOR) break;
|
||||||
useSectorLigthChanger(event.actor, §or[destObjIndex]);
|
useSectorLightChanger(event.actor, §or[destObjIndex]);
|
||||||
break;
|
break;
|
||||||
// change target of dudes and make it fight
|
// change target of dudes and make it fight
|
||||||
case kModernDudeTargetChanger:
|
case kModernDudeTargetChanger:
|
||||||
|
@ -6746,7 +6746,7 @@ void useDataChanger(DBloodActor* sourceactor, int objType, int objIndex, DBloodA
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void useSectorLigthChanger(DBloodActor* sourceactor, sectortype* pSector)
|
void useSectorLightChanger(DBloodActor* sourceactor, sectortype* pSector)
|
||||||
{
|
{
|
||||||
auto pXSource = &sourceactor->x();
|
auto pXSource = &sourceactor->x();
|
||||||
spritetype* pSource = &sourceactor->s();
|
spritetype* pSource = &sourceactor->s();
|
||||||
|
@ -8925,9 +8925,9 @@ DBloodActor* evrIsRedirector(DBloodActor* actor)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
DBloodActor* evrListRedirectors(int objType, int objXIndex, DBloodActor* objActor, DBloodActor* pXRedir, int* tx)
|
DBloodActor* evrListRedirectors(int objType, int objIndex, DBloodActor* objActor, DBloodActor* pXRedir, int* tx)
|
||||||
{
|
{
|
||||||
if (!gEventRedirectsUsed) return NULL;
|
if (!gEventRedirectsUsed) return nullptr;
|
||||||
else if (pXRedir && (*tx = listTx(pXRedir, *tx)) != -1)
|
else if (pXRedir && (*tx = listTx(pXRedir, *tx)) != -1)
|
||||||
return pXRedir;
|
return pXRedir;
|
||||||
|
|
||||||
|
@ -8935,19 +8935,25 @@ DBloodActor* evrListRedirectors(int objType, int objXIndex, DBloodActor* objActo
|
||||||
switch (objType)
|
switch (objType)
|
||||||
{
|
{
|
||||||
case OBJ_SECTOR:
|
case OBJ_SECTOR:
|
||||||
if (!xsectRangeIsFine(objXIndex)) return NULL;
|
{
|
||||||
id = xsector[objXIndex].txID;
|
auto pSector = §or[objIndex];
|
||||||
|
if (!pSector->hasX()) return nullptr;
|
||||||
|
id = sector[objIndex].xs().txID;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case OBJ_SPRITE:
|
case OBJ_SPRITE:
|
||||||
if (!objActor) return NULL;
|
if (!objActor) return nullptr;
|
||||||
id = objActor->x().txID;
|
id = objActor->x().txID;
|
||||||
break;
|
break;
|
||||||
case OBJ_WALL:
|
case OBJ_WALL:
|
||||||
if (!xwallRangeIsFine(objXIndex)) return NULL;
|
{
|
||||||
id = xwall[objXIndex].txID;
|
auto pWall = &wall[objIndex];
|
||||||
|
if (!pWall->hasX()) return nullptr;
|
||||||
|
id = wall[objIndex].xw().txID;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool prevFound = false;
|
bool prevFound = false;
|
||||||
|
|
|
@ -321,7 +321,7 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor);
|
||||||
void useSoundGen(DBloodActor* sourceactor, DBloodActor* actor);
|
void useSoundGen(DBloodActor* sourceactor, DBloodActor* actor);
|
||||||
void useIncDecGen(DBloodActor* sourceactor, short objType, int objIndex, DBloodActor* objactor);
|
void useIncDecGen(DBloodActor* sourceactor, short objType, int objIndex, DBloodActor* objactor);
|
||||||
void useDataChanger(DBloodActor* sourceactor, int objType, int objIndex, DBloodActor* objActor);
|
void useDataChanger(DBloodActor* sourceactor, int objType, int objIndex, DBloodActor* objActor);
|
||||||
void useSectorLigthChanger(DBloodActor* pXSource, sectortype* pSector);
|
void useSectorLightChanger(DBloodActor* pXSource, sectortype* pSector);
|
||||||
void useTargetChanger(DBloodActor* sourceactor, DBloodActor* actor);
|
void useTargetChanger(DBloodActor* sourceactor, DBloodActor* actor);
|
||||||
void usePictureChanger(DBloodActor* sourceactor, int objType, int objIndex, DBloodActor* objActor);
|
void usePictureChanger(DBloodActor* sourceactor, int objType, int objIndex, DBloodActor* objActor);
|
||||||
void useSequentialTx(DBloodActor* pXSource, COMMAND_ID cmd, bool setState);
|
void useSequentialTx(DBloodActor* pXSource, COMMAND_ID cmd, bool setState);
|
||||||
|
|
Loading…
Reference in a new issue