diff --git a/source/core/thingdef_data.cpp b/source/core/thingdef_data.cpp index 554550fe5..3404b5513 100644 --- a/source/core/thingdef_data.cpp +++ b/source/core/thingdef_data.cpp @@ -126,7 +126,7 @@ static FFlagDef DukeActorFlagDefs[] = DEFINE_FLAG(SFLAG, INFLAME, DDukeActor, flags1), DEFINE_FLAG(SFLAG, NOFLOORFIRE, DDukeActor, flags1), DEFINE_FLAG(SFLAG, HITRADIUS_CHECKHITONLY, DDukeActor, flags1), - DEFINE_FLAG(SFLAG, HITRADIUS_FLAG2, DDukeActor, flags1), + DEFINE_FLAG(SFLAG, HITRADIUS_FORCEEFFECT, DDukeActor, flags1), DEFINE_FLAG(SFLAG, CHECKSLEEP, DDukeActor, flags1), DEFINE_FLAG(SFLAG, NOTELEPORT, DDukeActor, flags1), DEFINE_FLAG(SFLAG, SE24_REMOVE, DDukeActor, flags1), @@ -181,6 +181,7 @@ static FFlagDef DukeActorFlagDefs[] = DEFINE_FLAG(SFLAG3, NOCEILINGBLAST, DDukeActor, flags3), DEFINE_FLAG(SFLAG3, HITRADIUS_DONTHURTSHOOTER, DDukeActor, flags3), DEFINE_FLAG(SFLAG3, HITRADIUS_NODAMAGE, DDukeActor, flags3), + DEFINE_FLAG(SFLAG3, HITRADIUS_NOEFFECT, DDukeActor, flags3), }; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 439113268..5b621618c 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -188,7 +188,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h checkhitsprite(act2, actor); } } - else if (act2->spr.extra >= 0 && act2 != actor && ((act2->flags1 & SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))) + else if (act2->spr.extra >= 0 && act2 != actor && ((act2->flags1 & SFLAG_HITRADIUS_FORCEEFFECT) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))) { if (actor->spr.picnum == DTILE_SHRINKSPARK && act2->spr.picnum != DTILE_SHARK && (act2->spr.scale.X < 0.375)) { diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index c432f99d9..22a636f96 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -174,13 +174,13 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h checkhitsprite(act2, actor); } } - else if (act2->spr.extra >= 0 && act2 != actor && ((act2->flags1 & SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))) + else if (act2->spr.extra >= 0 && act2 != actor && ((act2->flags1 & SFLAG_HITRADIUS_FORCEEFFECT) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))) { if (actor->flags3 & SFLAG3_HITRADIUS_DONTHURTSHOOTER && act2 == Owner) { continue; } - if ((isRRRA()) && act2->spr.picnum == RTILE_MINION && act2->spr.pal == 19) + if (actor->flags3 & SFLAG3_HITRADIUS_NOEFFECT) { continue; } diff --git a/source/games/duke/src/constants.h b/source/games/duke/src/constants.h index ebd8d93ba..6ba15738e 100644 --- a/source/games/duke/src/constants.h +++ b/source/games/duke/src/constants.h @@ -345,8 +345,8 @@ enum sflags_t SFLAG_FLAMMABLEPOOLEFFECT = 0x00400000, SFLAG_INFLAME = 0x00800000, SFLAG_NOFLOORFIRE = 0x01000000, - SFLAG_HITRADIUS_FLAG1 = 0x02000000, - SFLAG_HITRADIUS_FLAG2 = 0x04000000, + SFLAG_HITRADIUS_CHECKHITONLY = 0x02000000, + SFLAG_HITRADIUS_FORCEEFFECT = 0x04000000, SFLAG_CHECKSLEEP = 0x08000000, SFLAG_NOTELEPORT = 0x10000000, SFLAG_SE24_REMOVE = 0x20000000, @@ -412,6 +412,10 @@ enum sflags3_t SFLAG3_DONTLIGHTSHOOTER = 0x00000400, SFLAG3_SHOOTCENTERED = 0x00000800, // enemies default to right hand shooting. This disables it. SFLAG3_NOCEILINGBLAST = 0x00001000, // do not damage ceilings when exploding + SFLAG3_HITRADIUS_DONTHURTSHOOTER = 0x00002000, + SFLAG3_HITRADIUS_NODAMAGE = 0x00004000, // Hitradius inflicts no damage, only a damage type. + SFLAG3_HITRADIUS_NOEFFECT = 0x00008000, // Completely immune to hitradius + }; diff --git a/wadsrc/static/zscript/games/duke/actors/bowling.zs b/wadsrc/static/zscript/games/duke/actors/bowling.zs index a24893223..173d24af0 100644 --- a/wadsrc/static/zscript/games/duke/actors/bowling.zs +++ b/wadsrc/static/zscript/games/duke/actors/bowling.zs @@ -4,7 +4,7 @@ class RedneckBowlingPin : DukeActor { RedneckBowlingPin.Behavior 0; spriteset "BOWLINGPIN", "BOWLINGPIN1", "BOWLINGPIN2"; - +HITRADIUS_FLAG2; + +HITRADIUS_FORCEEFFECT; +HITRADIUSCHECK; } @@ -125,7 +125,7 @@ class RedneckHenstand : RedneckBowlingPin { spriteset "HENSTAND", "HENSTAND1"; RedneckBowlingPin.Behavior 1; - -HITRADIUS_FLAG2; + -HITRADIUS_FORCEEFFECT; -HITRADIUSCHECK; } @@ -156,7 +156,7 @@ class RedneckBowlingBall : RedneckBowlingPin { pic "BOWLINGBALL"; RedneckBowlingPin.Behavior 2; - -HITRADIUS_FLAG2; + -HITRADIUS_FORCEEFFECT; -HITRADIUSCHECK; } diff --git a/wadsrc/static/zscript/games/duke/actors/dukeweapons/tripbomb.zs b/wadsrc/static/zscript/games/duke/actors/dukeweapons/tripbomb.zs index c54bea7a6..4ff56b212 100644 --- a/wadsrc/static/zscript/games/duke/actors/dukeweapons/tripbomb.zs +++ b/wadsrc/static/zscript/games/duke/actors/dukeweapons/tripbomb.zs @@ -15,7 +15,7 @@ class DukeTripBomb : DukeActor // Note: The trip bomb has its health defined through CON! Value is 100. Con-based definitions will take precendence. strength 100; +CHECKSLEEP; - +HITRADIUS_FLAG2; + +HITRADIUS_FORCEEFFECT; +MOVEFTA_MAKESTANDABLE; +SE24_NOCARRY; +DONTANIMATE; diff --git a/wadsrc/static/zscript/games/duke/actors/minion.zs b/wadsrc/static/zscript/games/duke/actors/minion.zs index 46a766e54..8dee5551f 100644 --- a/wadsrc/static/zscript/games/duke/actors/minion.zs +++ b/wadsrc/static/zscript/games/duke/actors/minion.zs @@ -15,6 +15,10 @@ class RedneckMinion : DukeActor self.setClipDistFromTile(); if (Raze.isRRRA() && ud.ufospawnsminion) self.pal = 8; + if (self.pal == 19) + { + self.bHitradius_NoEffect = true; + } } override bool animate(tspritetype t) diff --git a/wadsrc/static/zscript/games/duke/actors/player.zs b/wadsrc/static/zscript/games/duke/actors/player.zs index 2d13e8b88..2cdedb0c6 100644 --- a/wadsrc/static/zscript/games/duke/actors/player.zs +++ b/wadsrc/static/zscript/games/duke/actors/player.zs @@ -40,7 +40,7 @@ class DukePlayerLyingDead : DukeActor default { pic "DUKELYINGDEAD"; - +HITRADIUS_FLAG2; + +HITRADIUS_FORCEEFFECT; } override void Initialize() diff --git a/wadsrc/static/zscript/games/duke/actors/queball.zs b/wadsrc/static/zscript/games/duke/actors/queball.zs index 2a5a6dd9f..2c7fb3d2c 100644 --- a/wadsrc/static/zscript/games/duke/actors/queball.zs +++ b/wadsrc/static/zscript/games/duke/actors/queball.zs @@ -8,7 +8,7 @@ class DukeQueball : DukeActor default { pic "QUEBALL"; - +HITRADIUS_FLAG2; + +HITRADIUS_FORCEEFFECT; +HITRADIUSCHECK; }