- Added BHS's death special flags submission.

SVN r1887 (trunk)
This commit is contained in:
Christoph Oelckers 2009-09-28 15:59:20 +00:00
parent 6d357b84b4
commit 9aab795c18
5 changed files with 16 additions and 3 deletions

View File

@ -1,4 +1,5 @@
September 28, 2009 (Changes by Graf Zahl) September 28, 2009 (Changes by Graf Zahl)
- Added BHS's death special flags submission.
- Added Gez's A_Blast submission. - Added Gez's A_Blast submission.
September 27, 2009 (Changes by Graf Zahl) September 27, 2009 (Changes by Graf Zahl)

View File

@ -442,6 +442,8 @@ enum EThingSpecialActivationType
THINGSPEC_MonsterTrigger = 8, // The thing can be triggered by a monster THINGSPEC_MonsterTrigger = 8, // The thing can be triggered by a monster
THINGSPEC_MissileTrigger = 16, // The thing can be triggered by a projectile THINGSPEC_MissileTrigger = 16, // The thing can be triggered by a projectile
THINGSPEC_ClearSpecial = 32, // Clears special after successful activation THINGSPEC_ClearSpecial = 32, // Clears special after successful activation
THINGSPEC_NoDeathSpecial = 64, // Don't activate special on death
THINGSPEC_TriggerActs = 128, // The trigger is the activator of the special (overrides LEVEL_ACTOWNSPECIAL Hexen hack)
}; };
// [RH] Like msecnode_t, but for the blockmap // [RH] Like msecnode_t, but for the blockmap

View File

@ -420,10 +420,16 @@ void AActor::Die (AActor *source, AActor *inflictor)
// the activator of the script. // the activator of the script.
// New: In Hexen, the thing that died is the activator, // New: In Hexen, the thing that died is the activator,
// so now a level flag selects who the activator gets to be. // so now a level flag selects who the activator gets to be.
if (special && (!(flags & MF_SPECIAL) || (flags3 & MF3_ISMONSTER))) if (special && (!(flags & MF_SPECIAL) || (flags3 & MF3_ISMONSTER)) && !(activationtype & THINGSPEC_NoDeathSpecial))
{ {
LineSpecials[special] (NULL, level.flags & LEVEL_ACTOWNSPECIAL // Activation flags override LEVEL_ACTOWNSPECIAL if set.
? this : source, false, args[0], args[1], args[2], args[3], args[4]); AActor *activator = (activationtype & THINGSPEC_TriggerActs ? source :
(activationtype & THINGSPEC_ThingActs ? this : (level.flags & LEVEL_ACTOWNSPECIAL ? this : source)));
if (activationtype & THINGSPEC_ThingTargets)
this->target = source;
if (activationtype & THINGSPEC_TriggerTargets)
source->target = this;
LineSpecials[special] (NULL, activator, false, args[0], args[1], args[2], args[3], args[4]);
special = 0; special = 0;
} }

View File

@ -463,6 +463,8 @@ static int ParseThingActivation (FScanner &sc)
{ "THINGSPEC_MonsterTrigger", THINGSPEC_MonsterTrigger}, { "THINGSPEC_MonsterTrigger", THINGSPEC_MonsterTrigger},
{ "THINGSPEC_MissileTrigger", THINGSPEC_MissileTrigger}, { "THINGSPEC_MissileTrigger", THINGSPEC_MissileTrigger},
{ "THINGSPEC_ClearSpecial", THINGSPEC_ClearSpecial}, { "THINGSPEC_ClearSpecial", THINGSPEC_ClearSpecial},
{ "THINGSPEC_NoDeathSpecial", THINGSPEC_NoDeathSpecial},
{ "THINGSPEC_TriggerActs", THINGSPEC_TriggerActs},
{ NULL, 0 } { NULL, 0 }
}; };

View File

@ -86,6 +86,8 @@ enum
THINGSPEC_MonsterTrigger = 8, THINGSPEC_MonsterTrigger = 8,
THINGSPEC_MissileTrigger = 16, THINGSPEC_MissileTrigger = 16,
THINGSPEC_ClearSpecial = 32, THINGSPEC_ClearSpecial = 32,
THINGSPEC_NoDeathSpecial = 64,
THINGSPEC_TriggerActs = 128,
}; };
// Shorter aliases for same // Shorter aliases for same
const int AF_Default = 0; const int AF_Default = 0;