This commit is contained in:
Christoph Oelckers 2021-08-27 16:44:24 +02:00
parent b8f8c0fe04
commit 41316f7f8f
2 changed files with 13 additions and 16 deletions

View file

@ -605,7 +605,7 @@ void sub_76A08(DBloodActor *actor, spritetype *pSprite2, PLAYER *pPlayer) // ???
pSprite->y = pSprite2->y;
pSprite->z = sector[pSprite2->sectnum].floorz-(bottom-pSprite->z);
pSprite->ang = pSprite2->ang;
ChangeSpriteSect(pSprite->index, pSprite2->sectnum);
ChangeActorSect(actor, pSprite2->sectnum);
sfxPlay3DSound(pSprite2, 201, -1, 0);
actor->xvel() = actor->yvel() = actor->zvel() = 0;
viewBackupSpriteLoc(pSprite->index, pSprite);

View file

@ -417,19 +417,17 @@ void evSend(DBloodActor* actor, int nIndex, int nType, int rxId, COMMAND_ID comm
case kChannelRemoteBomb6:
case kChannelRemoteBomb7:
{
int nSprite;
StatIterator it(kStatThing);
while ((nSprite = it.NextIndex()) >= 0)
BloodStatIterator it(kStatThing);
while (auto actor = it.Next())
{
spritetype* pSprite = &sprite[nSprite];
spritetype* pSprite = &actor->s();
if (pSprite->flags & 32)
continue;
int nXSprite = pSprite->extra;
if (nXSprite > 0)
if (actor->hasX())
{
XSPRITE* pXSprite = &xsprite[nXSprite];
XSPRITE* pXSprite = &actor->x();
if (pXSprite->rxID == rxId)
trMessageSprite(nSprite, event);
trMessageSprite(actor->s().index, event);
}
}
return;
@ -438,18 +436,17 @@ void evSend(DBloodActor* actor, int nIndex, int nType, int rxId, COMMAND_ID comm
case kChannelTeamBFlagCaptured:
{
int nSprite;
StatIterator it(kStatItem);
while ((nSprite = it.NextIndex()) >= 0)
BloodStatIterator it(kStatItem);
while (auto actor = it.Next())
{
spritetype* pSprite = &sprite[nSprite];
spritetype* pSprite = &actor->s();
if (pSprite->flags & 32)
continue;
int nXSprite = pSprite->extra;
if (nXSprite > 0)
if (actor->hasX())
{
XSPRITE* pXSprite = &xsprite[nXSprite];
XSPRITE* pXSprite = &actor->x();
if (pXSprite->rxID == rxId)
trMessageSprite(nSprite, event);
trMessageSprite(actor->s().index, event);
}
}
return;