Commit 3c4a8bb4 authored by Dino Bollinger's avatar Dino Bollinger Committed by Richard Gobeille
Browse files

Duke3D: Add projectile WORKSLIKE flag PROJECTILE_HITRADIUS_ADDITIVE

This flag alters the radiusdamage calculation such that the blast
damage is added to the current htextra of the actor, rather than
overwriting the current applied damage completely.
parent ff4d086f
......@@ -199,7 +199,11 @@ void A_RadiusDamageObject_Internal(int const spriteNum, int const otherSprite, i
if (dmgBase == dmgFuzz)
++dmgFuzz;
dmgActor.htextra = dmgBase + (krand()%(dmgFuzz-dmgBase));
int dmgTotal = dmgBase + (krand()%(dmgFuzz-dmgBase));
if (SpriteProjectile[spriteNum].workslike & PROJECTILE_HITRADIUS_ADDITIVE)
dmgActor.htextra += dmgTotal;
else
dmgActor.htextra = dmgTotal;
if (!A_CheckSpriteFlags(otherSprite, SFLAG_NODAMAGEPUSH))
{
......
......@@ -388,6 +388,8 @@ enum pflags_t : unsigned int
PROJECTILE_ACCURATE = 0x00100000,
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
// PROJECTILE_PENETRATE = 0x00800000,
PROJECTILE_HITRADIUS_ADDITIVE = 0x01000000,
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
};
......
......@@ -6286,6 +6286,7 @@ static void C_AddDefaultDefinitions(void)
{ "PF_COOLEXPLOSION1", PROJECTILE_COOLEXPLOSION1 },
{ "PF_EXPLODEONTIMER", PROJECTILE_EXPLODEONTIMER },
{ "PF_FORCEIMPACT", PROJECTILE_FORCEIMPACT },
{ "PF_HITRADIUS_ADDITIVE", PROJECTILE_HITRADIUS_ADDITIVE },
{ "PF_HITSCAN", PROJECTILE_HITSCAN },
{ "PF_KNEE", PROJECTILE_KNEE },
{ "PF_LOSESVELOCITY", PROJECTILE_LOSESVELOCITY },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment