- Converted the rest of a_strifestuff.cpp to DECORATE.

- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
  I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
  this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.


SVN r1126 (trunk)
This commit is contained in:
Christoph Oelckers 2008-08-07 20:16:07 +00:00
parent 0e009ff18a
commit 6b3325b358
19 changed files with 433 additions and 430 deletions

View file

@ -1,4 +1,12 @@
August 7, 2008 (Changes by Graf Zahl)
- Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.
- Removed the NoBlockingSet method from AActor because everything using it has been
converted to DECORATE using DropItem instead.
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved

View file

@ -306,6 +306,7 @@ enum
MF5_SPECIALFIREDAMAGE=0x01000000, // Special treatment of PhoenixFX1 turned into a flag to removr
// dependence of main engine code of specific actor types.
MF5_SUMMONEDMONSTER = 0x02000000, // To mark the friendly Minotaur. Hopefully to be generalized later.
MF5_NOVERTICALMELEERANGE=0x04000000,// Does not check vertical distance for melee range
// --- mobj.renderflags ---
@ -452,6 +453,17 @@ public:
return (AActor *)(RUNTIME_TYPE(this)->Defaults);
}
// Return true if the monster should use a missile attack, false for melee
bool SuggestMissileAttack (fixed_t dist);
// Adjusts the angle for deflection/reflection of incoming missiles
// Returns true if the missile should be allowed to explode anyway
bool AdjustReflectionAngle (AActor *thing, angle_t &angle);
// Returns true if this actor is within melee range of its target
bool CheckMeleeRange ();
// BeginPlay: Called just after the actor is created
virtual void BeginPlay ();
// LevelSpawned: Called after BeginPlay if this actor was spawned by the world
@ -467,9 +479,6 @@ public:
// Smallest yaw interval for a mapthing to be spawned with
virtual angle_t AngleIncrements ();
// Return true if the monster should use a missile attack, false for melee
virtual bool SuggestMissileAttack (fixed_t dist);
// Called when actor dies
virtual void Die (AActor *source, AActor *inflictor);
@ -490,9 +499,6 @@ public:
// Made a metadata property so no longer virtual
void Howl ();
// Called by A_NoBlocking in case the actor wants to drop some presents
virtual void NoBlockingSet ();
// Called by A_SinkMobj
virtual fixed_t GetSinkSpeed ();
@ -505,10 +511,6 @@ public:
// Called when an actor with MF_MISSILE and MF2_FLOORBOUNCE hits the floor
virtual bool FloorBounceMissile (secplane_t &plane);
// Adjusts the angle for deflection/reflection of incoming missiles
// Returns true if the missile should be allowed to explode anyway
virtual bool AdjustReflectionAngle (AActor *thing, angle_t &angle);
// Called when an actor is to be reflected by a disc of repulsion.
// Returns true to continue normal blast processing.
virtual bool SpecialBlastHandling (AActor *source, fixed_t strength);
@ -531,9 +533,6 @@ public:
// Returns true if it's okay to switch target to "other" after being attacked by it.
virtual bool OkayToSwitchTarget (AActor *other);
// Returns true if this actor is within melee range of its target
virtual bool CheckMeleeRange ();
// Something just touched this actor.
virtual void Touch (AActor *toucher);

View file

@ -109,9 +109,7 @@ ACTOR(ResetReloadCounter)
ACTOR(ClearReFire)
ACTOR(SpawnSingleItem)
ACTOR(GiveQuestItem)
ACTOR(Bang4Cloud)
ACTOR(HandLower)
ACTOR(WakeOracleSpectre)
ACTOR(RemoveForceField)
ACTOR(M_Refire)
ACTOR(M_CheckAttack)
@ -306,6 +304,14 @@ ACTOR(LoremasterChain)
ACTOR(ExtraLightOff)
ACTOR(Explode512)
ACTOR(LightGoesOut)
ACTOR(Bang4Cloud)
ACTOR(HandLower)
ACTOR(WakeOracleSpectre)
ACTOR(StalkerLookInit)
ACTOR(StalkerChaseDecide)
ACTOR(StalkerWalk)
ACTOR(StalkerAttack)
ACTOR(StalkerDrop)
// Special code pointers for Strife's player - not to be used elsewhere!
ACTOR(ItBurnsItBurns)

View file

@ -20,6 +20,7 @@ void A_PoisonBagDamage (AActor *);
void A_PoisonBagCheck (AActor *);
void A_CheckThrowBomb (AActor *);
void A_CheckThrowBomb2 (AActor *);
void A_TimeBomb(AActor *self);
// Fire Bomb (Flechette used by Mage) ---------------------------------------
@ -27,11 +28,6 @@ class AFireBomb : public AActor
{
DECLARE_ACTOR (AFireBomb, AActor)
public:
void PreExplode ()
{
z += 32*FRACUNIT;
RenderStyle = STYLE_Normal;
}
};
FState AFireBomb::States[] =
@ -42,7 +38,7 @@ FState AFireBomb::States[] =
S_NORMAL (PSBG, 'A', 10, NULL , &States[S_FIREBOMB1+3]),
S_NORMAL (PSBG, 'B', 4, NULL , &States[S_FIREBOMB1+4]),
S_NORMAL (PSBG, 'C', 4, A_Scream , &States[S_FIREBOMB1+5]),
S_BRIGHT (XPL1, 'A', 4, A_Explode , &States[S_FIREBOMB1+6]),
S_BRIGHT (XPL1, 'A', 4, A_TimeBomb , &States[S_FIREBOMB1+6]),
S_BRIGHT (XPL1, 'B', 4, NULL , &States[S_FIREBOMB1+7]),
S_BRIGHT (XPL1, 'C', 4, NULL , &States[S_FIREBOMB1+8]),
S_BRIGHT (XPL1, 'D', 4, NULL , &States[S_FIREBOMB1+9]),

View file

@ -13,30 +13,12 @@ static FRandom pr_tele ("TeleportSelf");
class AArtiTeleport : public AInventory
{
DECLARE_ACTOR (AArtiTeleport, AInventory)
DECLARE_CLASS (AArtiTeleport, AInventory)
public:
bool Use (bool pickup);
};
FState AArtiTeleport::States[] =
{
S_NORMAL (ATLP, 'A', 4, NULL, &States[1]),
S_NORMAL (ATLP, 'B', 4, NULL, &States[2]),
S_NORMAL (ATLP, 'C', 4, NULL, &States[3]),
S_NORMAL (ATLP, 'B', 4, NULL, &States[0])
};
IMPLEMENT_ACTOR (AArtiTeleport, Raven, 36, 18)
PROP_Flags (MF_SPECIAL|MF_COUNTITEM)
PROP_Flags2 (MF2_FLOATBOB)
PROP_SpawnState (0)
PROP_Inventory_DefMaxAmount
PROP_Inventory_PickupFlash (1)
PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND)
PROP_Inventory_Icon ("ARTIATLP")
PROP_Inventory_PickupSound ("misc/p_pkup")
PROP_Inventory_PickupMessage("$TXT_ARTITELEPORT")
END_DEFAULTS
IMPLEMENT_CLASS (AArtiTeleport)
bool AArtiTeleport::Use (bool pickup)
{
@ -82,7 +64,7 @@ bool AArtiTeleport::Use (bool pickup)
bool P_AutoUseChaosDevice (player_t *player)
{
AArtiTeleport *arti = player->mo->FindInventory<AArtiTeleport> ();
AInventory *arti = player->mo->FindInventory(PClass::FindClass("ArtiTeleport"));
if (arti != NULL)
{

View file

@ -42,12 +42,6 @@ void AMinotaur::Tick ()
}
}
void AMinotaur::NoBlockingSet ()
{
P_DropItem (this, "ArtiSuperHealth", 0, 51);
P_DropItem (this, "PhoenixRodAmmo", 10, 84);
}
bool AMinotaur::Slam (AActor *thing)
{
// Slamming minotaurs shouldn't move non-creatures
@ -165,11 +159,6 @@ bool AMinotaurFriend::OkayToSwitchTarget (AActor *other)
return Super::OkayToSwitchTarget (other);
}
void AMinotaurFriend::NoBlockingSet ()
{
// Do not drop anything
}
// Action functions for the minotaur ----------------------------------------
//----------------------------------------------------------------------------

View file

@ -7,7 +7,6 @@ class AMinotaur : public AActor
{
DECLARE_CLASS (AMinotaur, AActor)
public:
void NoBlockingSet ();
int DoSpecialDamage (AActor *target, int damage);
public:
@ -21,7 +20,6 @@ class AMinotaurFriend : public AMinotaur
public:
int StartTime;
void NoBlockingSet ();
bool IsOkayToAttack (AActor *target);
void Die (AActor *source, AActor *inflictor);
bool OkayToSwitchTarget (AActor *other);

View file

@ -97,7 +97,6 @@ void A_NoBlocking (AActor *actor)
actor->Conversation = NULL;
// If the actor has attached metadata for items to drop, drop those.
// Otherwise, call NoBlockingSet() and let it decide what to drop.
if (!actor->IsKindOf (RUNTIME_CLASS (APlayerPawn))) // [GRB]
{
FDropItem *di = GetDropItems(RUNTIME_TYPE(actor));
@ -114,10 +113,6 @@ void A_NoBlocking (AActor *actor)
di = di->Next;
}
}
else
{
actor->NoBlockingSet ();
}
}
}

View file

@ -278,7 +278,7 @@ enum
WIF_POWERED_UP = 0x00000400, // this is a tome-of-power'ed version of its sister
WIF_NO_AUTO_SWITCH = 0x00001000, // never switch to this weapon when it's picked up
WIF_STAFF2_KICKBACK = 0x00002000, // the powered-up Heretic staff has special kickback
WIF_STAFF2_KICKBACK = 0x00002000, // the powered-up Heretic staff has special kickba
WIF_CHEATNOTWEAPON = 1<<27, // Give cheat considers this not a weapon (used by Sigil)

View file

@ -7,137 +7,39 @@
static FRandom pr_stalker ("Stalker");
void A_StalkerLookInit (AActor *);
void A_StalkerChaseDecide (AActor *);
void A_StalkerWalk (AActor *);
void A_StalkerAttack (AActor *);
void A_StalkerDrop (AActor *);
// Stalker ------------------------------------------------------------------
class AStalker : public AActor
{
DECLARE_ACTOR (AStalker, AActor)
public:
bool CheckMeleeRange ();
};
FState AStalker::States[] =
{
#define S_STALK_SPAWN 0
S_NORMAL (STLK, 'A', 1, A_StalkerLookInit, &States[S_STALK_SPAWN]),
#define S_STALK_STND_CEIL (S_STALK_SPAWN+1)
S_NORMAL (STLK, 'A', 10, A_Look, &States[S_STALK_STND_CEIL]),
#define S_STALK_STND_FLOOR (S_STALK_STND_CEIL+1)
S_NORMAL (STLK, 'J', 10, A_Look, &States[S_STALK_STND_FLOOR]),
#define S_STALK_CHASE (S_STALK_STND_FLOOR+1)
S_NORMAL (STLK, 'A', 1, A_StalkerChaseDecide, &States[S_STALK_CHASE+1]),
S_NORMAL (STLK, 'A', 3, A_Chase, &States[S_STALK_CHASE+2]),
S_NORMAL (STLK, 'B', 3, A_Chase, &States[S_STALK_CHASE+3]),
S_NORMAL (STLK, 'B', 3, A_Chase, &States[S_STALK_CHASE+4]),
S_NORMAL (STLK, 'C', 3, A_StalkerWalk, &States[S_STALK_CHASE+5]),
S_NORMAL (STLK, 'C', 3, A_Chase, &States[S_STALK_CHASE]),
#define S_STALK_ATK (S_STALK_CHASE+6)
S_NORMAL (STLK, 'J', 3, A_FaceTarget, &States[S_STALK_ATK+1]),
S_NORMAL (STLK, 'K', 3, A_StalkerAttack, &States[S_STALK_ATK+2]),
#define S_STALK_GROUND_CHASE (S_STALK_ATK+2)
S_NORMAL (STLK, 'J', 3, A_StalkerWalk, &States[S_STALK_GROUND_CHASE+1]),
S_NORMAL (STLK, 'K', 3, A_Chase, &States[S_STALK_GROUND_CHASE+2]),
S_NORMAL (STLK, 'K', 3, A_Chase, &States[S_STALK_GROUND_CHASE+3]),
S_NORMAL (STLK, 'L', 3, A_StalkerWalk, &States[S_STALK_GROUND_CHASE+4]),
S_NORMAL (STLK, 'L', 3, A_Chase, &States[S_STALK_GROUND_CHASE]),
#define S_STALK_PAIN (S_STALK_GROUND_CHASE+5)
S_NORMAL (STLK, 'L', 1, A_Pain, &States[S_STALK_CHASE]),
#define S_STALK_FLIP (S_STALK_PAIN+1)
S_NORMAL (STLK, 'C', 2, A_StalkerDrop, &States[S_STALK_FLIP+1]),
S_NORMAL (STLK, 'I', 3, NULL, &States[S_STALK_FLIP+2]),
S_NORMAL (STLK, 'H', 3, NULL, &States[S_STALK_FLIP+3]),
S_NORMAL (STLK, 'G', 3, NULL, &States[S_STALK_FLIP+4]),
S_NORMAL (STLK, 'F', 3, NULL, &States[S_STALK_FLIP+5]),
S_NORMAL (STLK, 'E', 3, NULL, &States[S_STALK_FLIP+6]),
S_NORMAL (STLK, 'D', 3, NULL, &States[S_STALK_GROUND_CHASE]),
#define S_STALK_DIE (S_STALK_FLIP+7)
S_NORMAL (STLK, 'O', 4, NULL, &States[S_STALK_DIE+1]),
S_NORMAL (STLK, 'P', 4, A_Scream, &States[S_STALK_DIE+2]),
S_NORMAL (STLK, 'Q', 4, NULL, &States[S_STALK_DIE+3]),
S_NORMAL (STLK, 'R', 4, NULL, &States[S_STALK_DIE+4]),
S_NORMAL (STLK, 'S', 4, NULL, &States[S_STALK_DIE+5]),
S_NORMAL (STLK, 'T', 4, NULL, &States[S_STALK_DIE+6]),
S_NORMAL (STLK, 'U', 4, A_NoBlocking, &States[S_STALK_DIE+7]),
S_NORMAL (STLK, 'V', 4, NULL, &States[S_STALK_DIE+8]),
S_NORMAL (STLK, 'W', 4, NULL, &States[S_STALK_DIE+9]),
S_BRIGHT (STLK, 'X', 4, NULL, &States[S_STALK_DIE+10]),
S_BRIGHT (STLK, 'Y', 4, NULL, &States[S_STALK_DIE+11]),
S_BRIGHT (STLK, 'Z', 4, NULL, &States[S_STALK_DIE+12]),
S_BRIGHT (STLK, '[', 4, NULL, NULL)
};
IMPLEMENT_ACTOR (AStalker, Strife, 186, 0)
PROP_StrifeType (92)
PROP_SpawnHealth (80)
PROP_SpawnState (S_STALK_SPAWN)
PROP_SeeState (S_STALK_CHASE)
PROP_PainState (S_STALK_PAIN)
PROP_PainChance (40)
PROP_MeleeState (S_STALK_ATK)
PROP_DeathState (S_STALK_DIE)
PROP_SpeedFixed (16)
PROP_RadiusFixed (31)
PROP_HeightFixed (25)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_SPAWNCEILING|MF_NOGRAVITY|MF_DROPOFF|
MF_NOBLOOD|MF_COUNTKILL)
PROP_Flags2 (MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
PROP_Flags4 (MF4_INCOMBAT)
PROP_MaxDropOffHeight (32)
PROP_MinMissileChance (150)
PROP_SeeSound ("stalker/sight")
PROP_AttackSound ("stalker/attack")
PROP_PainSound ("stalker/pain")
PROP_DeathSound ("stalker/death")
PROP_ActiveSound ("stalker/active")
PROP_HitObituary ("$OB_STALKER")
END_DEFAULTS
void A_StalkerChaseDecide (AActor *self)
{
if (!(self->flags & MF_NOGRAVITY))
{
self->SetState (&AStalker::States[S_STALK_GROUND_CHASE]);
self->SetState (self->FindState("SeeFloor"));
}
else if (self->ceilingz - self->height > self->z)
{
self->SetState (&AStalker::States[S_STALK_FLIP]);
self->SetState (self->FindState("Drop"));
}
}
void A_StalkerLookInit (AActor *self)
{
FState *state;
if (self->flags & MF_NOGRAVITY)
{
if (self->state->NextState != &AStalker::States[S_STALK_STND_CEIL])
{
self->SetState (&AStalker::States[S_STALK_STND_CEIL]);
}
state = self->FindState("LookCeiling");
}
else
{
if (self->state->NextState != &AStalker::States[S_STALK_STND_FLOOR])
{
self->SetState (&AStalker::States[S_STALK_STND_FLOOR]);
}
state = self->FindState("LookFloor");
}
if (self->state->NextState != state)
{
self->SetState (state);
}
}
void A_StalkerDrop (AActor *self)
{
self->flags5 &= ~MF5_NOVERTICALMELEERANGE;
self->flags &= ~MF_NOGRAVITY;
}
@ -145,7 +47,7 @@ void A_StalkerAttack (AActor *self)
{
if (self->flags & MF_NOGRAVITY)
{
self->SetState (&AStalker::States[S_STALK_FLIP]);
self->SetState (self->FindState("Drop"));
}
else if (self->target != NULL)
{
@ -166,30 +68,3 @@ void A_StalkerWalk (AActor *self)
A_Chase (self);
}
bool AStalker::CheckMeleeRange ()
{
if (!(flags & MF_NOGRAVITY))
{
return Super::CheckMeleeRange ();
}
else
{
AActor *pl;
fixed_t dist;
if (!target)
return false;
pl = target;
dist = P_AproxDistance (pl->x - x, pl->y - y);
if (dist >= MELEERANGE-20*FRACUNIT + pl->radius)
return false;
if (!P_CheckSight (this, pl, 0))
return false;
return true;
}
}

View file

@ -389,28 +389,12 @@ void A_RemoveForceField (AActor *);
class AForceFieldGuard : public AActor
{
DECLARE_ACTOR (AForceFieldGuard, AActor)
DECLARE_CLASS (AForceFieldGuard, AActor)
public:
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
};
FState AForceFieldGuard::States[] =
{
S_NORMAL (TOKN, 'A', -1, NULL, NULL),
S_NORMAL (XPRK, 'A', 1, A_RemoveForceField, NULL)
};
IMPLEMENT_ACTOR (AForceFieldGuard, Strife, 25, 0)
PROP_StrifeType (0)
PROP_SpawnHealth (10)
PROP_SpawnState (0)
PROP_DeathState (1)
PROP_RadiusFixed (2)
PROP_HeightFixed (1)
PROP_Mass (10000)
PROP_Flags (MF_SHOOTABLE|MF_NOSECTOR)
PROP_Flags4 (MF4_INCOMBAT)
END_DEFAULTS
IMPLEMENT_CLASS (AForceFieldGuard)
int AForceFieldGuard::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
{
@ -453,59 +437,6 @@ void A_GetHurt (AActor *self)
}
}
class AKneelingGuy : public AActor
{
DECLARE_ACTOR (AKneelingGuy, AActor)
};
FState AKneelingGuy::States[] =
{
#define S_KNEEL 0
S_NORMAL (NEAL, 'A', 15, A_LoopActiveSound, &States[S_KNEEL+1]),
S_NORMAL (NEAL, 'B', 40, A_LoopActiveSound, &States[S_KNEEL]),
#define S_KNEEL_PAIN (S_KNEEL+2)
S_NORMAL (NEAL, 'C', 5, A_SetShadow, &States[S_KNEEL_PAIN+1]),
S_NORMAL (NEAL, 'B', 4, A_Pain, &States[S_KNEEL_PAIN+2]),
S_NORMAL (NEAL, 'C', 5, A_ClearShadow, &States[S_KNEEL]),
#define S_KNEEL_HURT (S_KNEEL_PAIN+3)
S_NORMAL (NEAL, 'B', 6, NULL, &States[S_KNEEL_HURT+1]),
S_NORMAL (NEAL, 'C', 13, A_GetHurt, &States[S_KNEEL_HURT]),
#define S_KNEEL_DIE (S_KNEEL_HURT+2)
S_NORMAL (NEAL, 'D', 5, NULL, &States[S_KNEEL_DIE+1]),
S_NORMAL (NEAL, 'E', 5, A_Scream, &States[S_KNEEL_DIE+2]),
S_NORMAL (NEAL, 'F', 6, NULL, &States[S_KNEEL_DIE+3]),
S_NORMAL (NEAL, 'G', 5, A_NoBlocking, &States[S_KNEEL_DIE+4]),
S_NORMAL (NEAL, 'H', 5, NULL, &States[S_KNEEL_DIE+5]),
S_NORMAL (NEAL, 'I', 6, NULL, &States[S_KNEEL_DIE+6]),
S_NORMAL (NEAL, 'J', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (AKneelingGuy, Strife, 204, 0)
PROP_SpawnState (S_KNEEL)
PROP_SeeState (S_KNEEL)
PROP_PainState (S_KNEEL_PAIN)
PROP_WoundState (S_KNEEL_HURT)
PROP_DeathState (S_KNEEL_DIE)
PROP_SpawnHealth (51)
PROP_PainChance (255)
PROP_RadiusFixed (6)
PROP_HeightFixed (17)
PROP_MassLong (50000)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD)
PROP_Flags3 (MF3_ISMONSTER)
PROP_Flags4 (MF4_INCOMBAT)
PROP_MinMissileChance (150)
PROP_StrifeType (37)
PROP_PainSound ("misc/static")
PROP_DeathSound ("misc/static")
PROP_ActiveSound ("misc/chant")
END_DEFAULTS
// Klaxon Warning Light -----------------------------------------------------
void A_TurretLook (AActor *self)
@ -561,99 +492,16 @@ void A_KlaxonBlare (AActor *self)
}
}
class AKlaxonWarningLight : public AActor
{
DECLARE_ACTOR (AKlaxonWarningLight, AActor)
};
FState AKlaxonWarningLight::States[] =
{
S_NORMAL (KLAX, 'A', 5, A_TurretLook, &States[0]),
S_NORMAL (KLAX, 'B', 6, A_KlaxonBlare, &States[2]),
S_NORMAL (KLAX, 'C', 60, NULL, &States[1])
};
IMPLEMENT_ACTOR (AKlaxonWarningLight, Strife, 24, 0)
PROP_SpawnState (0)
PROP_SeeState (1)
PROP_ReactionTime (60)
PROP_RadiusFixed(5)
PROP_Flags (MF_NOBLOCKMAP|MF_AMBUSH|MF_SPAWNCEILING|MF_NOGRAVITY)
PROP_Flags4 (MF4_FIXMAPTHINGPOS|MF4_NOSPLASHALERT|MF4_SYNCHRONIZED)
PROP_StrifeType (121)
END_DEFAULTS
// CeilingTurret ------------------------------------------------------------
void A_ShootGun (AActor *);
class ACeilingTurret : public AActor
{
DECLARE_ACTOR (ACeilingTurret, AActor)
};
FState ACeilingTurret::States[] =
{
S_NORMAL (TURT, 'A', 5, A_TurretLook, &States[0]),
S_NORMAL (TURT, 'A', 2, A_Chase, &States[1]),
S_NORMAL (TURT, 'B', 4, A_ShootGun, &States[3]),
S_NORMAL (TURT, 'D', 3, A_SentinelRefire, &States[4]),
S_NORMAL (TURT, 'A', 4, A_SentinelRefire, &States[2]),
S_BRIGHT (BALL, 'A', 6, A_Scream, &States[6]),
S_BRIGHT (BALL, 'B', 6, NULL, &States[7]),
S_BRIGHT (BALL, 'C', 6, NULL, &States[8]),
S_BRIGHT (BALL, 'D', 6, NULL, &States[9]),
S_BRIGHT (BALL, 'E', 6, NULL, &States[10]),
S_NORMAL (TURT, 'C', -1, NULL, NULL)
};
IMPLEMENT_ACTOR (ACeilingTurret, Strife, 27, 0)
PROP_StrifeType (122)
PROP_SpawnHealth (125)
PROP_SpawnState (0)
PROP_SeeState (1)
PROP_PainState (2)
PROP_MissileState (2)
PROP_DeathState (5)
PROP_SpeedFixed (0)
PROP_PainChance (0)
PROP_MassLong (10000000)
PROP_Flags (MF_SHOOTABLE|MF_AMBUSH|MF_SPAWNCEILING|MF_NOGRAVITY|
MF_NOBLOOD|MF_COUNTKILL)
PROP_Flags4 (MF4_NOSPLASHALERT|MF4_DONTFALL)
PROP_MinMissileChance (150)
PROP_DeathSound ("turret/death")
END_DEFAULTS
// Power Coupling -----------------------------------------------------------
class APowerCoupling : public AActor
{
DECLARE_ACTOR (APowerCoupling, AActor)
DECLARE_CLASS (APowerCoupling, AActor)
public:
void Die (AActor *source, AActor *inflictor);
};
FState APowerCoupling::States[] =
{
S_NORMAL (COUP, 'A', 5, NULL, &States[1]),
S_NORMAL (COUP, 'B', 5, NULL, &States[0]),
};
IMPLEMENT_ACTOR (APowerCoupling, Strife, 220, 0)
PROP_SpawnState (0)
PROP_SpawnHealth (40)
PROP_RadiusFixed (17)
PROP_HeightFixed (64)
PROP_MassLong (999999)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_DROPPED|MF_NOBLOOD|MF_NOTDMATCH)
PROP_Flags4 (MF4_INCOMBAT)
PROP_StrifeType (288)
END_DEFAULTS
IMPLEMENT_CLASS (APowerCoupling)
void APowerCoupling::Die (AActor *source, AActor *inflictor)
{
@ -686,7 +534,7 @@ void APowerCoupling::Die (AActor *source, AActor *inflictor)
class AMeat : public AActor
{
DECLARE_ACTOR (AMeat, AActor)
DECLARE_CLASS (AMeat, AActor)
public:
void BeginPlay ()
{
@ -695,70 +543,7 @@ public:
}
};
FState AMeat::States[] =
{
S_NORMAL (MEAT, 'A', 700, NULL, NULL),
S_NORMAL (MEAT, 'B', 700, NULL, NULL),
S_NORMAL (MEAT, 'C', 700, NULL, NULL),
S_NORMAL (MEAT, 'D', 700, NULL, NULL),
S_NORMAL (MEAT, 'E', 700, NULL, NULL),
S_NORMAL (MEAT, 'F', 700, NULL, NULL),
S_NORMAL (MEAT, 'G', 700, NULL, NULL),
S_NORMAL (MEAT, 'H', 700, NULL, NULL),
S_NORMAL (MEAT, 'I', 700, NULL, NULL),
S_NORMAL (MEAT, 'J', 700, NULL, NULL),
S_NORMAL (MEAT, 'K', 700, NULL, NULL),
S_NORMAL (MEAT, 'L', 700, NULL, NULL),
S_NORMAL (MEAT, 'M', 700, NULL, NULL),
S_NORMAL (MEAT, 'N', 700, NULL, NULL),
S_NORMAL (MEAT, 'O', 700, NULL, NULL),
S_NORMAL (MEAT, 'P', 700, NULL, NULL),
S_NORMAL (MEAT, 'Q', 700, NULL, NULL),
S_NORMAL (MEAT, 'R', 700, NULL, NULL),
S_NORMAL (MEAT, 'S', 700, NULL, NULL),
S_NORMAL (MEAT, 'T', 700, NULL, NULL)
};
IMPLEMENT_ACTOR (AMeat, Any, -1, 0)
PROP_SpawnState (0)
PROP_Flags (MF_NOCLIP)
END_DEFAULTS
// Gibs for things that don't bleed -----------------------------------------
class AJunk : public AMeat
{
DECLARE_ACTOR (AJunk, AMeat)
};
FState AJunk::States[] =
{
S_NORMAL (JUNK, 'A', 700, NULL, NULL),
S_NORMAL (JUNK, 'B', 700, NULL, NULL),
S_NORMAL (JUNK, 'C', 700, NULL, NULL),
S_NORMAL (JUNK, 'D', 700, NULL, NULL),
S_NORMAL (JUNK, 'E', 700, NULL, NULL),
S_NORMAL (JUNK, 'F', 700, NULL, NULL),
S_NORMAL (JUNK, 'G', 700, NULL, NULL),
S_NORMAL (JUNK, 'H', 700, NULL, NULL),
S_NORMAL (JUNK, 'I', 700, NULL, NULL),
S_NORMAL (JUNK, 'J', 700, NULL, NULL),
S_NORMAL (JUNK, 'K', 700, NULL, NULL),
S_NORMAL (JUNK, 'L', 700, NULL, NULL),
S_NORMAL (JUNK, 'M', 700, NULL, NULL),
S_NORMAL (JUNK, 'N', 700, NULL, NULL),
S_NORMAL (JUNK, 'O', 700, NULL, NULL),
S_NORMAL (JUNK, 'P', 700, NULL, NULL),
S_NORMAL (JUNK, 'Q', 700, NULL, NULL),
S_NORMAL (JUNK, 'R', 700, NULL, NULL),
S_NORMAL (JUNK, 'S', 700, NULL, NULL),
S_NORMAL (JUNK, 'T', 700, NULL, NULL)
};
IMPLEMENT_ACTOR (AJunk, Any, -1, 0)
PROP_SpawnState (0)
PROP_Flags (MF_NOCLIP)
END_DEFAULTS
IMPLEMENT_CLASS (AMeat)
//==========================================================================
//
@ -768,7 +553,7 @@ END_DEFAULTS
void A_TossGib (AActor *self)
{
const PClass *gibtype = (self->flags & MF_NOBLOOD) ? RUNTIME_CLASS(AJunk) : RUNTIME_CLASS(AMeat);
const char *gibtype = (self->flags & MF_NOBLOOD) ? "Junk" : "Meat";
AActor *gib = Spawn (gibtype, self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
angle_t an;
int speed;

View file

@ -237,10 +237,13 @@ bool AActor::CheckMeleeRange ()
return true;
// [RH] Don't melee things too far above or below actor.
if (pl->z > z + height)
return false;
if (pl->z + pl->height < z)
return false;
if (!(flags5 & MF5_NOVERTICALMELEERANGE))
{
if (pl->z > z + height)
return false;
if (pl->z + pl->height < z)
return false;
}
if (!P_CheckSight (this, pl, 0))
return false;
@ -2590,7 +2593,6 @@ void A_Explode (AActor *thing)
int distance = 128;
bool hurtSource = true;
thing->PreExplode ();
thing->GetExplodeParms (damage, distance, hurtSource);
P_RadiusAttack (thing, thing->target, damage, distance, thing->DamageType, hurtSource);
if (thing->z <= thing->floorz + (distance<<FRACBITS))

View file

@ -2334,10 +2334,6 @@ void AActor::Howl ()
}
}
void AActor::NoBlockingSet ()
{
}
fixed_t AActor::GetSinkSpeed ()
{
return FRACUNIT;

View file

@ -246,6 +246,7 @@ static flagdef ActorFlags[]=
DEFINE_FLAG(MF5, PUFFGETSOWNER, AActor, flags5), // [BB] added PUFFGETSOWNER
DEFINE_FLAG(MF5, SPECIALFIREDAMAGE, AActor, flags5),
DEFINE_FLAG(MF5, SUMMONEDMONSTER, AActor, flags5),
DEFINE_FLAG(MF5, NOVERTICALMELEERANGE, AActor, flags5),
// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
@ -305,7 +306,7 @@ static flagdef WeaponFlags[] =
DEFINE_FLAG(WIF_BOT, BFG, AWeapon, WeaponFlags),
DEFINE_FLAG(WIF, CHEATNOTWEAPON, AWeapon, WeaponFlags),
DEFINE_FLAG(WIF, NO_AUTO_SWITCH, AWeapon, WeaponFlags),
//WIF_BOT_REACTION_SKILL_THING = 1<<31, // I don't understand this
DEFINE_FLAG(WIF, GIVEPARENT, AWeapon, WeaponFlags),
DEFINE_DUMMY_FLAG(NOLMS),
};

View file

@ -185,6 +185,7 @@ class Actor extends Thinker
action native A_Bang4Cloud();
action native A_DropFire();
action native A_GiveQuestItem(eval int itemno);
action native A_RemoveForcefield();
}
class Inventory extends Actor

View file

@ -0,0 +1,24 @@
// Teleport (self) ----------------------------------------------------------
ACTOR ArtiTeleport : Inventory native
{
Game Raven
+COUNTITEM
+FLOATBOB
+INVENTORY.INVBAR
+INVENTORY.PICKUPFLASH
+INVENTORY.FANCYPICKUPSOUND
Inventory.DefMaxAmount
Inventory.Icon "ARTIATLP"
Inventory.PickupSound "misc/p_pkup"
Inventory.PickupMessage "$TXT_ARTITELEPORT"
States
{
Spawn:
ATLP ABCD 4
Loop
}
}

View file

@ -0,0 +1,78 @@
// Stalker ------------------------------------------------------------------
ACTOR Stalker 186
{
Game Strife
ConversationID 92,-1,-1
Health 80
Painchance 40
Speed 16
Radius 31
Height 25
Monster
+NOGRAVITY
+DROPOFF
+NOBLOOD
+SPAWNCEILING
+INCOMBAT
+NOVERTICALMELEERANGE
MaxDropOffHeight 32
MinMissileChance 150
SeeSound "stalker/sight"
AttackSound "stalker/attack"
PainSound "stalker/pain"
DeathSound "stalker/death"
ActiveSound "stalker/active"
HitObituary "$OB_STALKER"
action native A_StalkerLookInit ();
action native A_StalkerChaseDecide ();
action native A_StalkerWalk ();
action native A_StalkerDrop ();
action native A_StalkerAttack ();
states
{
Spawn:
STLK A 1 A_StalkerLookInit
Loop
LookCeiling:
STLK A 10 A_Look
Loop
LookFloor:
STLK J 10 A_Look
Loop
See:
STLK A 1 A_StalkerChaseDecide
STLK ABB 3 A_Chase
STLK C 3 A_StalkerWalk
STLK C 3 A_Chase
Loop
Melee:
STLK J 3 A_FaceTarget
STLK K 3 A_StalkerAttack
SeeFloor:
STLK J 3 A_StalkerWalk
STLK JKK 3 A_Chase
STLK L 3 A_StalkerWalk
STLK L 3 A_Chase
Loop
Pain:
STLK L 1 A_Pain
Goto See
Drop:
STLK C 2 A_StalkerDrop
STLK IHGFED 3
Goto SeeFloor
Death:
STLK O 4
STLK P 4 A_Scream
STLK QRST 4
STLK U 4 A_NoBlocking
STLK VW 4
STLK "XYZ[" 4 Bright
Stop
}
}

View file

@ -1657,3 +1657,269 @@ ACTOR TargetPractice 208
}
}
// Force Field Guard --------------------------------------------------------
ACTOR ForceFieldGuard 25 native
{
Game Strife
ConversationID 0
Health 10
Radius 2
Height 1
Mass 10000
+SHOOTABLE
+NOSECTOR
+NOBLOOD
+INCOMBAT
States
{
Spawn:
TNT1 A -1
Stop
Death:
TNT1 A 1 A_RemoveForceField
Stop
}
}
// Kneeling Guy -------------------------------------------------------------
ACTOR KneelingGuy 204
{
Game Strife
ConversationID 37,-1,-1
Health 51
Painchance 255
Radius 6
Height 17
Mass 50000
+SOLID
+SHOOTABLE
+NOBLOOD
+ISMONSTER
+INCOMBAT
PainSound "misc/static"
DeathSound "misc/static"
ActiveSound "misc/chant"
states
{
Spawn:
See:
NEAL A 15 A_LoopActiveSound
NEAL B 40 A_LoopActiveSound
Loop
Pain:
NEAL C 5 A_SetShadow
NEAL B 4 A_Pain
NEAL C 5 A_ClearShadow
Goto Spawn
Wound:
NEAL B 6
NEAL C 13 A_GetHurt
Loop
Death:
NEAL D 5
NEAL E 5 A_Scream
NEAL F 6
NEAL G 5 A_NoBlocking
NEAL H 5
NEAL I 6
NEAL J -1
Stop
}
}
// Klaxon Warning Light -----------------------------------------------------
ACTOR KlaxonWarningLight 24
{
Game Strife
ConversationID 121,-1,-1
ReactionTime 60
Radius 5
+NOBLOCKMAP +AMBUSH
+SPAWNCEILING +NOGRAVITY
+FIXMAPTHINGPOS +NOSPLASHALERT
+SYNCHRONIZED
States
{
Spawn:
KLAX A 5 A_TurretLook
Loop
See:
KLAX B 6 A_KlaxonBlare
KLAX C 60
Loop
}
}
// CeilingTurret ------------------------------------------------------------
ACTOR CeilingTurret 27
{
Game Strife
ConversationID 122,-1,-1
Health 125
Speed 0
Painchance 0
Mass 10000000
Monster
+AMBUSH
+SPAWNCEILING
+NOGRAVITY
+NOBLOOD
+NOSPLASHALERT
+DONTFALL
MinMissileChance 150
DeathSound "turret/death"
States
{
Spawn:
TURT A 5 A_TurretLook
Loop
See:
TURT A 2 A_Chase
Loop
Missile:
Pain:
TURT B 4 A_ShootGun
TURT D 3 A_SentinelRefire
TURT A 4 A_SentinelRefire
Loop
Death:
BALL A 6 Bright A_Scream
BALL BCDE 6 Bright
TURT C -1
Stop
}
}
// Power Coupling -----------------------------------------------------------
ACTOR PowerCoupling 220 native
{
Game Strife
ConversationID 288,-1,-1
Health 40
Radius 17
Height 64
Mass 999999
+SOLID
+SHOOTABLE
+DROPPED
+NOBLOOD
+NOTDMATCH
+INCOMBAT
States
{
Spawn:
COUP AB 5
Loop
}
}
// Gibs for things that bleed -----------------------------------------------
ACTOR Meat native
{
+NOCLIP
States
{
Spawn:
MEAT A 700
Stop
MEAT B 700
Stop
MEAT C 700
Stop
MEAT D 700
Stop
MEAT E 700
Stop
MEAT F 700
Stop
MEAT G 700
Stop
MEAT H 700
Stop
MEAT I 700
Stop
MEAT J 700
Stop
MEAT K 700
Stop
MEAT L 700
Stop
MEAT M 700
Stop
MEAT N 700
Stop
MEAT O 700
Stop
MEAT P 700
Stop
MEAT Q 700
Stop
MEAT R 700
Stop
MEAT S 700
Stop
MEAT T 700
Stop
}
}
// Gibs for things that don't bleed -----------------------------------------
ACTOR Junk : Meat
{
states
{
Spawn:
JUNK A 700
Stop
JUNK B 700
Stop
JUNK C 700
Stop
JUNK D 700
Stop
JUNK E 700
Stop
JUNK F 700
Stop
JUNK G 700
Stop
JUNK H 700
Stop
JUNK I 700
Stop
JUNK J 700
Stop
JUNK K 700
Stop
JUNK L 700
Stop
JUNK M 700
Stop
JUNK N 700
Stop
JUNK O 700
Stop
JUNK P 700
Stop
JUNK Q 700
Stop
JUNK R 700
Stop
JUNK S 700
Stop
JUNK T 700
Stop
}
}

View file

@ -42,6 +42,7 @@
#include "actors/doom/scriptedmarine.txt"
#include "actors/raven/artiegg.txt"
#include "actors/raven/artitele.txt"
#include "actors/raven/ravenartifacts.txt"
#include "actors/raven/ravenhealth.txt"
#include "actors/raven/ravenambient.txt"
@ -123,6 +124,7 @@
#include "actors/strife/rebels.txt"
#include "actors/strife/reaver.txt"
#include "actors/strife/sentinel.txt"
#include "actors/strife/stalker.txt"
#include "actors/strife/strifeammo.txt"
#include "actors/strife/strifearmor.txt"
#include "actors/strife/strifeitems.txt"