- replaced one more actor list check in hitradius with a flag.

This commit is contained in:
Christoph Oelckers 2022-01-18 23:09:42 +01:00
parent 125c3e8004
commit 72510a47fa
5 changed files with 5 additions and 2 deletions

View file

@ -332,7 +332,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
fi.checkhitsprite(act2, actor);
}
}
else if (act2->spr.extra >= 0 && act2 != actor && (act2->spr.picnum == TRIPBOMB || badguy(act2) || act2->spr.picnum == QUEBALL || act2->spr.picnum == STRIPEBALL || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL) || act2->spr.picnum == DUKELYINGDEAD))
else if (act2->spr.extra >= 0 && act2 != actor && (actorflag(act2, SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)))
{
if (actor->spr.picnum == SHRINKSPARK && act2->spr.picnum != SHARK && (act2 == Owner || act2->spr.xrepeat < 24))
{

View file

@ -279,7 +279,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
fi.checkhitsprite(act2, actor);
}
}
else if (act2->spr.extra >= 0 && act2 != actor && (badguy(act2) || act2->spr.picnum == QUEBALL || act2->spr.picnum == BOWLINGPIN || act2->spr.picnum == STRIPEBALL || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL) || act2->spr.picnum == DUKELYINGDEAD))
else if (act2->spr.extra >= 0 && act2 != actor && (actorflag(act2, SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)))
{
if (actor->spr.picnum == MORTER && act2 == Owner)
{

View file

@ -320,6 +320,7 @@ enum sflags_t
SFLAG_INFLAME = 0x00800000,
SFLAG_NOFLOORFIRE = 0x01000000,
SFLAG_HITRADIUS_FLAG1 = 0x02000000,
SFLAG_HITRADIUS_FLAG2 = 0x04000000,
};

View file

@ -205,6 +205,7 @@ void initactorflags_d()
setflag(SFLAG_INFLAME, { RADIUSEXPLOSION, RPG, FIRELASER, HYDRENT, HEAVYHBOMB });
setflag(SFLAG_NOFLOORFIRE, { TREE1, TREE2 });
setflag(SFLAG_HITRADIUS_FLAG1, { BOX, TREE1, TREE2, TIRE, CONE });
setflag(SFLAG_HITRADIUS_FLAG2, { TRIPBOMB, QUEBALL, STRIPEBALL, DUKELYINGDEAD });
if (isWorldTour())
{

View file

@ -235,6 +235,7 @@ void initactorflags_r()
if (isRRRA()) setflag(SFLAG_INFLAME, { RPG2 });
setflag(SFLAG_NOFLOORFIRE, { TREE1, TREE2 });
setflag(SFLAG_HITRADIUS_FLAG1, { BOX, TREE1, TREE2, TIRE });
setflag(SFLAG_HITRADIUS_FLAG2, { QUEBALL, STRIPEBALL, BOWLINGPIN, DUKELYINGDEAD });
// Animals were not supposed to have this, but due to a coding bug the logic was unconditional for everything in the game.
for (auto& ainf : gs.actorinfo)