- evSendSector, too.

This commit is contained in:
Christoph Oelckers 2021-11-23 17:34:39 +01:00
parent 0472c78ddc
commit 32874414fd
3 changed files with 13 additions and 13 deletions

View file

@ -598,9 +598,9 @@ void evSendActor(DBloodActor* actor, int rxId, COMMAND_ID command)
evSend(actor, 0, SS_SPRITE, rxId, command);
}
void evSendSector(int index, int rxId, COMMAND_ID command)
void evSendSector(sectortype* sect, int rxId, COMMAND_ID command)
{
evSend(nullptr, index, SS_SECTOR, rxId, command);
evSend(nullptr, sectnum(sect), SS_SECTOR, rxId, command);
}
void evSendWall(walltype* wal, int rxId, COMMAND_ID command)

View file

@ -207,7 +207,7 @@ void evPostActor(DBloodActor*, unsigned int nDelta, CALLBACK_ID callback);
void evPostSector(sectortype* index, unsigned int nDelta, COMMAND_ID command);
void evPostSector(sectortype* index, unsigned int nDelta, CALLBACK_ID callback);
void evPostWall(int index, unsigned int nDelta, COMMAND_ID command);
void evPostWall(walltype* index, unsigned int nDelta, COMMAND_ID command);
void evProcess(unsigned int nTime);
void evKillActor(DBloodActor*);

View file

@ -106,7 +106,7 @@ bool SetSectorState(int nSector, XSECTOR *pXSector, int nState)
if (nState == 1)
{
if (pXSector->command != kCmdLink && pXSector->triggerOn && pXSector->txID)
evSendSector(nSector,pXSector->txID, (COMMAND_ID)pXSector->command);
evSendSector(pSector,pXSector->txID, (COMMAND_ID)pXSector->command);
if (pXSector->stopOn)
{
pXSector->stopOn = 0;
@ -118,7 +118,7 @@ bool SetSectorState(int nSector, XSECTOR *pXSector, int nState)
else
{
if (pXSector->command != kCmdLink && pXSector->triggerOff && pXSector->txID)
evSendSector(nSector,pXSector->txID, (COMMAND_ID)pXSector->command);
evSendSector(pSector,pXSector->txID, (COMMAND_ID)pXSector->command);
if (pXSector->stopOff)
{
pXSector->stopOn = 0;
@ -1065,7 +1065,7 @@ int VCrushBusy(unsigned int nSector, unsigned int a2)
pSector->floorz = v10;
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector,pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1116,7 +1116,7 @@ int VSpriteBusy(unsigned int nSector, unsigned int a2)
}
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector,pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1213,7 +1213,7 @@ int VDoorBusy(unsigned int nSector, unsigned int a2)
ZTranslateSector(nSector, pXSector, a2, nWave);
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector,pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1241,7 +1241,7 @@ int HDoorBusy(unsigned int nSector, unsigned int a2)
ZTranslateSector(nSector, pXSector, a2, nWave);
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector, pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1268,7 +1268,7 @@ int RDoorBusy(unsigned int nSector, unsigned int a2)
ZTranslateSector(nSector, pXSector, a2, nWave);
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector, pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1301,7 +1301,7 @@ int StepRotateBusy(unsigned int nSector, unsigned int a2)
}
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector, pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1320,7 +1320,7 @@ int GenSectorBusy(unsigned int nSector, unsigned int a2)
XSECTOR* pXSector = &pSector->xs();
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(nSector,pXSector->txID, kCmdLink);
evSendSector(pSector, pXSector->txID, kCmdLink);
if ((a2&0xffff) == 0)
{
SetSectorState(nSector, pXSector, FixedToInt(a2));
@ -1725,7 +1725,7 @@ void trTriggerSector(sectortype* pSector, int command)
pXSector->isTriggered = 1;
if (pXSector->decoupled && pXSector->txID > 0)
evSendSector(sectnum(pSector),pXSector->txID, (COMMAND_ID)pXSector->command);
evSendSector(pSector, pXSector->txID, (COMMAND_ID)pXSector->command);
else {
EVENT event;