diff --git a/source/games/blood/src/callback.cpp b/source/games/blood/src/callback.cpp index 271e35fc5..8b7ba9d08 100644 --- a/source/games/blood/src/callback.cpp +++ b/source/games/blood/src/callback.cpp @@ -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); diff --git a/source/games/blood/src/eventq.cpp b/source/games/blood/src/eventq.cpp index acf517d25..02b15a5c8 100644 --- a/source/games/blood/src/eventq.cpp +++ b/source/games/blood/src/eventq.cpp @@ -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;