- playerQavSceneProcess handled for rxBuckets

This commit is contained in:
Christoph Oelckers 2021-09-01 20:12:27 +02:00
parent db9d4efdc9
commit 40a8cd7fa3

View file

@ -6185,7 +6185,8 @@ QAV* playerQavSceneLoad(int qavId) {
void playerQavSceneProcess(PLAYER* pPlayer, QAVSCENE* pQavScene) { void playerQavSceneProcess(PLAYER* pPlayer, QAVSCENE* pQavScene) {
int nIndex = pQavScene->index; int nIndex = pQavScene->index;
if (xspriRangeIsFine(sprite[nIndex].extra)) { auto qavactor = &bloodActors[nIndex];
if (qavactor->hasX()) {
XSPRITE* pXSprite = &xsprite[sprite[nIndex].extra]; XSPRITE* pXSprite = &xsprite[sprite[nIndex].extra];
if (pXSprite->waitTime > 0 && --pXSprite->sysData1 <= 0) { if (pXSprite->waitTime > 0 && --pXSprite->sysData1 <= 0) {
@ -6195,9 +6196,9 @@ void playerQavSceneProcess(PLAYER* pPlayer, QAVSCENE* pQavScene) {
for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++) { for (int i = bucketHead[pXSprite->txID]; i < bucketHead[pXSprite->txID + 1]; i++) {
if (rxBucket[i].type == OBJ_SPRITE) { if (rxBucket[i].type == OBJ_SPRITE) {
spritetype* pSpr = &sprite[rxBucket[i].rxindex]; auto rxactor = rxBucket[i].GetActor();
if (pSpr->index == nIndex || !xspriRangeIsFine(pSpr->extra)) if (!rxactor || !rxactor->hasX() || rxactor == qavactor) continue;
continue; spritetype* pSpr = &rxactor->s();
pXSpr = &xsprite[pSpr->extra]; pXSpr = &xsprite[pSpr->extra];
if (pSpr->type == kModernPlayerControl && pXSpr->command == 67) { if (pSpr->type == kModernPlayerControl && pXSpr->command == 67) {
@ -6205,10 +6206,10 @@ void playerQavSceneProcess(PLAYER* pPlayer, QAVSCENE* pQavScene) {
else trPlayerCtrlStartScene(pXSpr, pPlayer, true); else trPlayerCtrlStartScene(pXSpr, pPlayer, true);
return; return;
} }
nnExtTriggerObject(rxBucket[i].type, rxactor->s().index, pXSprite->command);
} }
else nnExtTriggerObject(rxBucket[i].type, rxBucket[i].rxindex, pXSprite->command);
nnExtTriggerObject(rxBucket[i].type, rxBucket[i].rxindex, pXSprite->command);
} }
} //else { } //else {