- Added Gez's THRUSPECIES submission.

SVN r1626 (trunk)
This commit is contained in:
Christoph Oelckers 2009-05-31 20:14:16 +00:00
parent 4be0324dbd
commit fb5e392f2f
5 changed files with 15 additions and 1 deletions

View file

@ -1,4 +1,5 @@
May 31, 2009 (Changes by Graf Zahl) May 31, 2009 (Changes by Graf Zahl)
- Added Gez's THRUSPECIES submission.
- Added loading directories into the lump directory. - Added loading directories into the lump directory.
- fixed: The Dehacked parser could not parse flag values with the highest bit - fixed: The Dehacked parser could not parse flag values with the highest bit
set because it used atoi to convert the string into a number. set because it used atoi to convert the string into a number.

View file

@ -305,6 +305,8 @@ enum
MF5_MOVEWITHSECTOR = 0x80000000, // P_ChangeSector() will still process this actor if it has MF_NOBLOCKMAP MF5_MOVEWITHSECTOR = 0x80000000, // P_ChangeSector() will still process this actor if it has MF_NOBLOCKMAP
MF6_NOBOSSRIP = 0x00000001, // For rippermissiles: Don't rip through bosses. MF6_NOBOSSRIP = 0x00000001, // For rippermissiles: Don't rip through bosses.
MF6_THRUSPECIES = 0x00000002, // Actors passes through other of the same species.
MF6_MTHRUSPECIES = 0x00000004, // Missile passes through actors of its shooter's species.
// --- mobj.renderflags --- // --- mobj.renderflags ---

View file

@ -755,6 +755,9 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS) if ((thing->flags2 | tm.thing->flags2) & MF2_THRUACTORS)
return true; return true;
if ((tm.thing->flags6 & MF6_THRUSPECIES) && (tm.thing->Species == thing->Species))
return true;
if (!(thing->flags & (MF_SOLID|MF_SPECIAL|MF_SHOOTABLE)) ) if (!(thing->flags & (MF_SOLID|MF_SPECIAL|MF_SHOOTABLE)) )
return true; // can't hit thing return true; // can't hit thing
@ -836,6 +839,12 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
{ {
return true; return true;
} }
if ((tm.thing->flags6 & MF6_MTHRUSPECIES)
&& tm.thing->target // NULL pointer check
&& (tm.thing->target->GetSpecies() == thing->GetSpecies()))
return true;
// Check for rippers passing through corpses // Check for rippers passing through corpses
if ((thing->flags & MF_CORPSE) && (tm.thing->flags2 & MF2_RIP) && !(thing->flags & MF_SHOOTABLE)) if ((thing->flags & MF_CORPSE) && (tm.thing->flags2 & MF2_RIP) && !(thing->flags & MF_SHOOTABLE))
{ {

View file

@ -5118,7 +5118,7 @@ FName AActor::GetSpecies()
break; break;
} }
} }
return thistype->TypeName; return Species = thistype->TypeName; // [GZ] Speeds up future calls.
} }
//========================================================================== //==========================================================================

View file

@ -210,6 +210,8 @@ static FFlagDef ActorFlags[]=
DEFINE_FLAG(MF5, MOVEWITHSECTOR, AActor, flags5), DEFINE_FLAG(MF5, MOVEWITHSECTOR, AActor, flags5),
DEFINE_FLAG(MF6, NOBOSSRIP, AActor, flags6), DEFINE_FLAG(MF6, NOBOSSRIP, AActor, flags6),
DEFINE_FLAG(MF6, THRUSPECIES, AActor, flags6),
DEFINE_FLAG(MF6, MTHRUSPECIES, AActor, flags6),
// Effect flags // Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects), DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),