From 28911435d9a1eec1e031afb9923084d9edee33d7 Mon Sep 17 00:00:00 2001 From: "Richard C. Gobeille" Date: Mon, 8 Jun 2020 12:38:24 -0700 Subject: [PATCH] Duke3d: fix regression with the Devastator's ability to damage sprites in sectors other than the sector the rocket hit Fixes terminx/eduke32#62. --- source/duke3d/src/actors.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index bb7292b0a..84b7830ce 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -276,9 +276,11 @@ void A_RadiusDamage(int const spriteNum, int const blastRadius, int const dmg1, bfirst_search_init(sectorList, sectorMap, &numSectors, numsectors, pSprite->sectnum); #ifndef EDUKE32_STANDALONE + int wallDamage = true; + // rockets from the Devastator skip propagating damage to other sectors if (!FURY && (pSprite->picnum == RPG && pSprite->xrepeat < 11)) - goto wallsfinished; + wallDamage = false; #endif uint8_t *wallTouched; @@ -342,7 +344,10 @@ void A_RadiusDamage(int const spriteNum, int const blastRadius, int const dmg1, if (pWall->nextwall != -1) bitmap_set(wallCanSee, pWall->nextwall); - A_DamageWall_Internal(spriteNum, w, { p.x, p.y, pSprite->z }, pSprite->picnum); +#ifndef EDUKE32_STANDALONE + if (wallDamage) +#endif + A_DamageWall_Internal(spriteNum, w, { p.x, p.y, pSprite->z }, pSprite->picnum); } int const nextSector = pWall->nextsector;