mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- new explosion flags
This commit is contained in:
parent
fba8f54bb3
commit
8e89bc29e4
8 changed files with 32 additions and 65 deletions
|
@ -985,7 +985,7 @@ void movemasterswitch(DDukeActor *actor)
|
|||
}
|
||||
else if (effector->spr.statnum == STAT_STANDABLE)
|
||||
{
|
||||
if (actorflag(effector, SFLAG2_BRIGHTEXPLODE)) // SEENINE and OOZFILTER
|
||||
if (actorflag(effector, SFLAG2_BRIGHTEXPLODE)) // _SEENINE_ and _OOZFILTER_
|
||||
{
|
||||
effector->spr.shade = -31;
|
||||
}
|
||||
|
@ -1186,7 +1186,7 @@ void moveooz(DDukeActor* actor, int seenine, int seeninedead, int ooz, int explo
|
|||
DukeStatIterator it(STAT_STANDABLE);
|
||||
while (auto act2 = it.Next())
|
||||
{
|
||||
if (actor->spr.hitag == act2->spr.hitag && (act2->spr.picnum == seenine || act2->spr.picnum == ooz))
|
||||
if (actor->spr.hitag == act2->spr.hitag && actorflag(act2, SFLAG2_BRIGHTEXPLODE))
|
||||
act2->spr.shade = -32;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -632,22 +632,15 @@ int ifhitbyweapon_d(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
switch(actor->attackertype)
|
||||
if (attackerflag(actor, SFLAG2_DOUBLEDMGTHRUST))
|
||||
{
|
||||
case RADIUSEXPLOSION:
|
||||
case RPG:
|
||||
case HYDRENT:
|
||||
case HEAVYHBOMB:
|
||||
case SEENINE:
|
||||
case OOZFILTER:
|
||||
case EXPLODINGBARREL:
|
||||
ps[p].vel.X += actor->hitextra * bcos(actor->hitang, 2);
|
||||
ps[p].vel.Y += actor->hitextra * bsin(actor->hitang, 2);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
ps[p].vel.X += actor->hitextra * bcos(actor->hitang, 1);
|
||||
ps[p].vel.Y += actor->hitextra * bsin(actor->hitang, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -536,26 +536,15 @@ int ifhitbyweapon_r(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
|
||||
int pn = actor->attackertype;
|
||||
if (pn == RPG2 && !isRRRA()) pn = 0; // avoid messing around with gotos.
|
||||
switch (pn)
|
||||
if (attackerflag(actor, SFLAG2_DOUBLEDMGTHRUST))
|
||||
{
|
||||
case RADIUSEXPLOSION:
|
||||
case RPG:
|
||||
case HYDRENT:
|
||||
case HEAVYHBOMB:
|
||||
case SEENINE:
|
||||
case OOZFILTER:
|
||||
case EXPLODINGBARREL:
|
||||
case POWDERKEG:
|
||||
case RPG2:
|
||||
ps[p].vel.X += actor->hitextra * bcos(actor->hitang, 2);
|
||||
ps[p].vel.Y += actor->hitextra * bsin(actor->hitang, 2);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
else
|
||||
{
|
||||
ps[p].vel.X += actor->hitextra * bcos(actor->hitang, 1);
|
||||
ps[p].vel.Y += actor->hitextra * bsin(actor->hitang, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -339,6 +339,8 @@ enum sflags2_t
|
|||
SFLAG2_NOFLOORPAL = 0x00000008,
|
||||
SFLAG2_EXPLOSIVE = 0x00000010,
|
||||
SFLAG2_BRIGHTEXPLODE = 0x00000020,
|
||||
SFLAG2_DOUBLEDMGTHRUST = 0x00000040,
|
||||
SFLAG2_BREAKMIRRORS = 0x00000080,
|
||||
};
|
||||
|
||||
using EDukeFlags2 = TFlags<sflags2_t, uint32_t>;
|
||||
|
|
|
@ -216,6 +216,8 @@ void initactorflags_d()
|
|||
setflag(SFLAG2_NOFLOORPAL, { TRIPBOMB, LASERLINE });
|
||||
setflag(SFLAG2_EXPLOSIVE, { FIREEXT, RPG, RADIUSEXPLOSION, SEENINE, OOZFILTER });
|
||||
setflag(SFLAG2_BRIGHTEXPLODE, { SEENINE, OOZFILTER });
|
||||
setflag(SFLAG2_DOUBLEDMGTHRUST, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL });
|
||||
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL });
|
||||
|
||||
if (isWorldTour())
|
||||
{
|
||||
|
|
|
@ -243,6 +243,10 @@ void initactorflags_r()
|
|||
setflag(SFLAG2_EXPLOSIVE, {RPG, RADIUSEXPLOSION, SEENINE, OOZFILTER });
|
||||
if (isRRRA()) setflag(SFLAG2_EXPLOSIVE, { RPG2 });
|
||||
setflag(SFLAG2_BRIGHTEXPLODE, { SEENINE, OOZFILTER });
|
||||
setflag(SFLAG2_DOUBLEDMGTHRUST, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL, POWDERKEG });
|
||||
if (isRRRA()) setflag(SFLAG2_DOUBLEDMGTHRUST, { RPG2 });
|
||||
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL, POWDERKEG });
|
||||
if (isRRRA()) setflag(SFLAG2_BREAKMIRRORS, { RPG2 });
|
||||
|
||||
// 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)
|
||||
|
|
|
@ -644,24 +644,14 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, int x, int y, int z, int atw
|
|||
{
|
||||
int j, sn = -1, darkestwall;
|
||||
|
||||
if (wal->overpicnum == MIRROR)
|
||||
if (wal->overpicnum == MIRROR && gs.actorinfo[atwith].flags2 & SFLAG2_BREAKMIRRORS)
|
||||
{
|
||||
switch (atwith)
|
||||
{
|
||||
case HEAVYHBOMB:
|
||||
case RADIUSEXPLOSION:
|
||||
case RPG:
|
||||
case HYDRENT:
|
||||
case SEENINE:
|
||||
case OOZFILTER:
|
||||
case EXPLODINGBARREL:
|
||||
lotsofglass(spr, wal, 70);
|
||||
wal->cstat &= ~CSTAT_WALL_MASKED;
|
||||
wal->overpicnum = MIRRORBROKE;
|
||||
wal->portalflags = 0;
|
||||
S_PlayActorSound(GLASS_HEAVYBREAK, spr);
|
||||
return;
|
||||
}
|
||||
lotsofglass(spr, wal, 70);
|
||||
wal->cstat &= ~CSTAT_WALL_MASKED;
|
||||
wal->overpicnum = MIRRORBROKE;
|
||||
wal->portalflags = 0;
|
||||
S_PlayActorSound(GLASS_HEAVYBREAK, spr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == BIGFORCE) && wal->twoSided())
|
||||
|
|
|
@ -985,27 +985,14 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, int x, int y, int z, int atw
|
|||
int j;
|
||||
int sn = -1, darkestwall;
|
||||
|
||||
if (wal->overpicnum == MIRROR)
|
||||
if (wal->overpicnum == MIRROR && gs.actorinfo[atwith].flags2 & SFLAG2_BREAKMIRRORS)
|
||||
{
|
||||
switch (atwith)
|
||||
{
|
||||
case RPG2:
|
||||
if (!isRRRA()) break;
|
||||
[[fallthrough]];
|
||||
case HEAVYHBOMB:
|
||||
case RADIUSEXPLOSION:
|
||||
case RPG:
|
||||
case HYDRENT:
|
||||
case SEENINE:
|
||||
case OOZFILTER:
|
||||
case EXPLODINGBARREL:
|
||||
lotsofglass(spr, wal, 70);
|
||||
wal->cstat &= ~CSTAT_WALL_MASKED;
|
||||
wal->overpicnum = MIRRORBROKE;
|
||||
wal->portalflags = 0;
|
||||
S_PlayActorSound(GLASS_HEAVYBREAK, spr);
|
||||
return;
|
||||
}
|
||||
lotsofglass(spr, wal, 70);
|
||||
wal->cstat &= ~CSTAT_WALL_MASKED;
|
||||
wal->overpicnum = MIRRORBROKE;
|
||||
wal->portalflags = 0;
|
||||
S_PlayActorSound(GLASS_HEAVYBREAK, spr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == BIGFORCE) && wal->twoSided())
|
||||
|
|
Loading…
Reference in a new issue