From 7ac662e0c8402534f0ff353403aaaa3d0cf1d76a Mon Sep 17 00:00:00 2001 From: carnivoroussociety <38839485+carnivoroussociety@users.noreply.github.com> Date: Sun, 15 Aug 2021 18:31:47 +1000 Subject: [PATCH] Apply burning bypass to correct sprite type --- source/games/blood/src/actor.cpp | 6 +++--- source/games/blood/src/ai.cpp | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index 545bf32f2..1bd2438f3 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -5734,7 +5734,6 @@ void actProcessSprites(void) int nXSprite = pSprite->extra; if (nXSprite > 0) { XSPRITE *pXSprite = &xsprite[nXSprite]; - const bool fixBurnGlitch = IsBurningDude(pSprite) && !VanillaMode() && !DemoRecordStatus(); // if enemies are these types, always apply burning damage per tick switch (pSprite->type) { case kThingBloodBits: case kThingBloodChunks: @@ -5743,7 +5742,7 @@ void actProcessSprites(void) break; } - if ((pXSprite->burnTime > 0) || fixBurnGlitch) + if (pXSprite->burnTime > 0) { pXSprite->burnTime = ClipLow(pXSprite->burnTime-4,0); actDamageSprite(pXSprite->burnSource, pSprite, kDamageBurn, 8); @@ -6189,7 +6188,8 @@ void actProcessSprites(void) if (nXSprite > 0) { XSPRITE *pXSprite = &xsprite[nXSprite]; - if (pXSprite->burnTime > 0) + const bool fixBurnGlitch = IsBurningDude(pSprite) && !VanillaMode() && !DemoRecordStatus(); // if enemies are burning, always apply burning damage per tick + if ((pXSprite->burnTime > 0) || fixBurnGlitch) { switch (pSprite->type) { diff --git a/source/games/blood/src/ai.cpp b/source/games/blood/src/ai.cpp index 46f1e73b9..c2c6ff532 100644 --- a/source/games/blood/src/ai.cpp +++ b/source/games/blood/src/ai.cpp @@ -1110,10 +1110,16 @@ int aiDamageSprite(DBloodActor* source, DBloodActor* actor, DAMAGE_TYPE nDmgType case kDudeTinyCaleb: if (nDmgType == kDamageBurn && pXSprite->health <= (unsigned int)pDudeInfo->fleeHealth/* && (pXSprite->at17_6 != 1 || pXSprite->at17_6 != 2)*/) { - pSprite->type = kDudeBurningInnocent; if (!VanillaMode() && !DemoRecordStatus()) // fix burning sprite for tiny caleb + { pSprite->type = kDudeBurningTinyCaleb; - aiNewState(actor, &tinycalebBurnGoto); + aiNewState(actor, &tinycalebBurnGoto); + } + else + { + pSprite->type = kDudeBurningInnocent; + aiNewState(actor, &cultistBurnGoto); + } aiPlay3DSound(pSprite, 361, AI_SFX_PRIORITY_0, -1); gDudeExtra[pSprite->extra].time = PlayClock+360; actHealDude(pXSprite, dudeInfo[39].startHealth, dudeInfo[39].startHealth);