- removed the TakeSpecialDamage hacks for Macil and the Oracle and replaced them by

giving the first stage Sigil's projectiles a damage type and using a damage factor
  to disable damaging these actors.


SVN r2129 (trunk)
This commit is contained in:
Christoph Oelckers 2010-01-24 13:00:53 +00:00
parent 8b9d8137fc
commit 406b692cc9
8 changed files with 9 additions and 116 deletions

View file

@ -13,20 +13,6 @@
#include "doomstat.h"
*/
class AAlienSpectre1 : public ASpectralMonster
{
DECLARE_CLASS (AAlienSpectre1, ASpectralMonster)
};
IMPLEMENT_CLASS(AAlienSpectre1);
class AAlienSpectre3 : public AAlienSpectre1
{
DECLARE_CLASS (AAlienSpectre3, AAlienSpectre1)
public:
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
};
IMPLEMENT_CLASS(AAlienSpectre3);
static FRandom pr_spectrespawn ("AlienSpectreSpawn");
static FRandom pr_spectrechunk ("212e4");
@ -204,23 +190,3 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
S_Sound (CHAN_VOICE, voc, 1, ATTN_NORM);
player->player->SetLogNumber (log);
}
//============================================================================
//
// AAlienSpetre3 :: TakeSpecialDamage
//
// The third spectre type (the Oracle's) is invulnerable to the first stage
// Sigil, just like the Oracle.
//
//============================================================================
int AAlienSpectre3::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
{
if (inflictor != NULL)
{
FName name = inflictor->GetClass()->TypeName;
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
return -1;
}
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
}

View file

@ -1,47 +0,0 @@
/*
#include "actor.h"
#include "m_random.h"
#include "a_action.h"
#include "p_local.h"
#include "s_sound.h"
#include "a_strifeglobal.h"
*/
// Macil (version 1) ---------------------------------------------------------
class AMacil1 : public AActor
{
DECLARE_CLASS (AMacil1, AActor)
};
IMPLEMENT_CLASS (AMacil1)
// Macil (version 2) ---------------------------------------------------------
class AMacil2 : public AMacil1
{
DECLARE_CLASS (AMacil2, AMacil1)
public:
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
};
IMPLEMENT_CLASS (AMacil2)
//============================================================================
//
// AMacil2 :: TakeSpecialDamage
//
// Macil2 is invulnerable to the first stage Sigil.
//
//============================================================================
int AMacil2::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
{
if (inflictor != NULL)
{
FName name = inflictor->GetClass()->TypeName;
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
return -1;
}
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
}

View file

@ -7,16 +7,6 @@
#include "thingdef/thingdef.h"
*/
class AOracle : public AActor
{
DECLARE_CLASS (AOracle, AActor)
public:
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
};
IMPLEMENT_CLASS (AOracle)
DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
{
@ -31,22 +21,3 @@ DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
}
}
//============================================================================
//
// AOracle :: TakeSpecialDamage
//
// The Oracle is invulnerable to the first stage Sigil.
//
//============================================================================
int AOracle::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
{
if (inflictor != NULL)
{
FName name = inflictor->GetClass()->TypeName;
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
return -1;
}
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
}

View file

@ -28,7 +28,7 @@
#include "a_entityboss.cpp"
#include "a_inquisitor.cpp"
#include "a_loremaster.cpp"
#include "a_macil.cpp"
//#include "a_macil.cpp"
#include "a_oracle.cpp"
#include "a_programmer.cpp"
#include "a_reaver.cpp"

View file

@ -1,7 +1,7 @@
// Alien Spectre 1 -----------------------------------------------------------
ACTOR AlienSpectre1 : SpectralMonster 129 native
ACTOR AlienSpectre1 : SpectralMonster 129
{
Game Strife
ConversationID 67,-1,-1
@ -100,7 +100,7 @@ ACTOR AlienSpectre2 : AlienSpectre1 75
// Alien Spectre 3 ----------------------------------------------------------
// This is the Oracle's personal spectre, so it's a little different.
ACTOR AlienSpectre3 : AlienSpectre1 76 native
ACTOR AlienSpectre3 : AlienSpectre1 76
{
Game Strife
ConversationID 71,-1,-1

View file

@ -1,7 +1,7 @@
// Macil (version 1) ---------------------------------------------------------
ACTOR Macil1 64 native
ACTOR Macil1 64
{
Game Strife
ConversationID 49, 48, 49
@ -56,7 +56,7 @@ ACTOR Macil1 64 native
// Macil (version 2) ---------------------------------------------------------
ACTOR Macil2 : Macil1 200 native
ACTOR Macil2 : Macil1 200
{
Game Strife
ConversationID 50, 49, 50
@ -66,6 +66,7 @@ ACTOR Macil2 : Macil1 200 native
-NODAMAGE
DeathSound "macil/slop"
DropItem "None"
DamageFactor "SpectralLow", 0
States
{
Missile:

View file

@ -1,7 +1,7 @@
// Oracle -------------------------------------------------------------------
ACTOR Oracle 199 native
ACTOR Oracle 199
{
Game Strife
ConversationID 65, 62, 63
@ -11,6 +11,7 @@ ACTOR Oracle 199 native
Monster
+NOTDMATCH
DamageFactor "Fire", 0.5
DamageFactor "SpectralLow", 0
MaxDropoffHeight 32
Tag "Oracle"
DropItem "Meat"

View file

@ -198,6 +198,7 @@ ACTOR SpectralLightningV1 : SpectralLightningDeathShort
Height 24
Damage 100
Projectile
DamageType "SpectralLow"
+SPECTRAL
States
{