CON: Add projectile workslike flag PROJECTILE_NOSETOWNERSHADE = 0x00200000 = 2097152 that prevents actors from inheriting a projectile's shade when shooting it.

git-svn-id: https://svn.eduke32.com/eduke32@5106 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-03-28 09:48:51 +00:00
parent 257e271162
commit 806bbe6d71
2 changed files with 5 additions and 2 deletions

View file

@ -297,6 +297,7 @@ enum pflags_t {
PROJECTILE_FORCEIMPACT = 0x00040000,
PROJECTILE_REALCLIPDIST = 0x00080000,
PROJECTILE_ACCURATE = 0x00100000,
PROJECTILE_NOSETOWNERSHADE = 0x00200000,
PROJECTILE_TYPE_MASK = PROJECTILE_HITSCAN|PROJECTILE_RPG|PROJECTILE_KNEE|PROJECTILE_BLOOD,
};

View file

@ -894,7 +894,8 @@ static int32_t A_ShootCustom(const int32_t i, const int32_t atwith, int16_t sa,
switch (proj->workslike & PROJECTILE_TYPE_MASK)
{
case PROJECTILE_HITSCAN:
if (s->extra >= 0) s->shade = proj->shade;
if (!(proj->workslike & PROJECTILE_NOSETOWNERSHADE) && s->extra >= 0)
s->shade = proj->shade;
if (p >= 0)
P_PreFireHitscan(i, p, atwith, srcvect, &zvel, &sa,
@ -941,7 +942,8 @@ static int32_t A_ShootCustom(const int32_t i, const int32_t atwith, int16_t sa,
return -1;
case PROJECTILE_RPG:
if (s->extra >= 0) s->shade = proj->shade;
if (!(proj->workslike & PROJECTILE_NOSETOWNERSHADE) && s->extra >= 0)
s->shade = proj->shade;
vel = proj->vel;