Add PROJECTILE_RPG_IMPACT_DAMAGE flag for projectiles, 0x00400000. This makes PROJECTILE_RPG_IMPACT function more or less how it did prior to late 2016 when an issue involving the damage was identified and fixed, and moves the damage to the new flag.

git-svn-id: https://svn.eduke32.com/eduke32@6974 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-09-01 19:36:15 +00:00
parent 388a649ee5
commit 2738d8e2a4
3 changed files with 5 additions and 3 deletions

View file

@ -2945,7 +2945,9 @@ ACTOR_STATIC void Proj_MoveCustom(int const spriteNum)
{ {
actor[otherSprite].owner = pSprite->owner; actor[otherSprite].owner = pSprite->owner;
actor[otherSprite].picnum = pSprite->picnum; actor[otherSprite].picnum = pSprite->picnum;
actor[otherSprite].extra += pProj->extra;
if (pProj->workslike & PROJECTILE_RPG_IMPACT_DAMAGE)
actor[otherSprite].extra += pProj->extra;
A_DoProjectileEffects(spriteNum, &davect, 0); A_DoProjectileEffects(spriteNum, &davect, 0);

View file

@ -284,6 +284,7 @@ enum pflags_t
PROJECTILE_REALCLIPDIST = 0x00080000, PROJECTILE_REALCLIPDIST = 0x00080000,
PROJECTILE_ACCURATE = 0x00100000, PROJECTILE_ACCURATE = 0x00100000,
PROJECTILE_NOSETOWNERSHADE = 0x00200000, PROJECTILE_NOSETOWNERSHADE = 0x00200000,
PROJECTILE_RPG_IMPACT_DAMAGE = 0x00400000,
PROJECTILE_MOVED = 0x80000000, // internal flag, do not document PROJECTILE_MOVED = 0x80000000, // internal flag, do not document
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD, PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN | PROJECTILE_RPG | PROJECTILE_KNEE | PROJECTILE_BLOOD,
}; };

View file

@ -971,8 +971,7 @@ static int A_ShootCustom(int const spriteNum, int const projecTile, int shootAng
startPos->y + tabledivide32_noinline(sintable[(shootAng + 348) & 2047], pProj->offset), startPos->y + tabledivide32_noinline(sintable[(shootAng + 348) & 2047], pProj->offset),
startPos->z - (1 << 8), projecTile, 0, 14, 14, shootAng, pProj->vel, zvel, spriteNum, 4); startPos->z - (1 << 8), projecTile, 0, 14, 14, shootAng, pProj->vel, zvel, spriteNum, 4);
if (pProj->workslike & PROJECTILE_RPG_IMPACT_DAMAGE)
if (pProj->workslike & PROJECTILE_RPG_IMPACT)
sprite[otherSprite].extra = Proj_GetDamage(pProj); sprite[otherSprite].extra = Proj_GetDamage(pProj);
if (!(pProj->workslike & PROJECTILE_BOUNCESOFFWALLS)) if (!(pProj->workslike & PROJECTILE_BOUNCESOFFWALLS))