- Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now. - Fixed: The music strings in the default level info were never freed and caused memory leaks when used repeatedly. - Fixed: The intermusic string in the level info was never freed. - Fixed: The default fire obituary should only be printed if the damage came from the environment. If it comes from a monster the monster specific obituary should be used instead. - Added custom damage types from the floating point test release. - Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also be used by other actors so a more generalized approach is needed than hard coding it into the Pain Elemental. - Converted a few of Doom's monsters to DECORATE because I couldn't test the first version of the custom state code with the corpses inheriting from them. - Added custom states from last year's floating point test release and fixed some bugs I found in that code. Unfortunately it wasn't all salvageable and it was easier to recreate some parts from scratch. SVN r368 (trunk)
This commit is contained in:
parent
3b2c2efcb1
commit
063c85b157
118 changed files with 2103 additions and 1818 deletions
|
|
@ -8,99 +8,6 @@
|
|||
|
||||
static FRandom pr_sargattack ("SargAttack");
|
||||
|
||||
void A_SargAttack (AActor *);
|
||||
|
||||
class ADemon : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (ADemon, AActor)
|
||||
};
|
||||
|
||||
FState ADemon::States[] =
|
||||
{
|
||||
#define S_SARG_STND 0
|
||||
S_NORMAL (SARG, 'A', 10, A_Look , &States[S_SARG_STND+1]),
|
||||
S_NORMAL (SARG, 'B', 10, A_Look , &States[S_SARG_STND]),
|
||||
|
||||
#define S_SARG_RUN (S_SARG_STND+2)
|
||||
S_NORMAL (SARG, 'A', 2, A_Chase , &States[S_SARG_RUN+1]),
|
||||
S_NORMAL (SARG, 'A', 2, A_Chase , &States[S_SARG_RUN+2]),
|
||||
S_NORMAL (SARG, 'B', 2, A_Chase , &States[S_SARG_RUN+3]),
|
||||
S_NORMAL (SARG, 'B', 2, A_Chase , &States[S_SARG_RUN+4]),
|
||||
S_NORMAL (SARG, 'C', 2, A_Chase , &States[S_SARG_RUN+5]),
|
||||
S_NORMAL (SARG, 'C', 2, A_Chase , &States[S_SARG_RUN+6]),
|
||||
S_NORMAL (SARG, 'D', 2, A_Chase , &States[S_SARG_RUN+7]),
|
||||
S_NORMAL (SARG, 'D', 2, A_Chase , &States[S_SARG_RUN+0]),
|
||||
|
||||
#define S_SARG_ATK (S_SARG_RUN+8)
|
||||
S_NORMAL (SARG, 'E', 8, A_FaceTarget , &States[S_SARG_ATK+1]),
|
||||
S_NORMAL (SARG, 'F', 8, A_FaceTarget , &States[S_SARG_ATK+2]),
|
||||
S_NORMAL (SARG, 'G', 8, A_SargAttack , &States[S_SARG_RUN+0]),
|
||||
|
||||
#define S_SARG_PAIN (S_SARG_ATK+3)
|
||||
S_NORMAL (SARG, 'H', 2, NULL , &States[S_SARG_PAIN+1]),
|
||||
S_NORMAL (SARG, 'H', 2, A_Pain , &States[S_SARG_RUN+0]),
|
||||
|
||||
#define S_SARG_DIE (S_SARG_PAIN+2)
|
||||
S_NORMAL (SARG, 'I', 8, NULL , &States[S_SARG_DIE+1]),
|
||||
S_NORMAL (SARG, 'J', 8, A_Scream , &States[S_SARG_DIE+2]),
|
||||
S_NORMAL (SARG, 'K', 4, NULL , &States[S_SARG_DIE+3]),
|
||||
S_NORMAL (SARG, 'L', 4, A_NoBlocking , &States[S_SARG_DIE+4]),
|
||||
S_NORMAL (SARG, 'M', 4, NULL , &States[S_SARG_DIE+5]),
|
||||
S_NORMAL (SARG, 'N', -1, NULL , NULL),
|
||||
|
||||
#define S_SARG_RAISE (S_SARG_DIE+6)
|
||||
S_NORMAL (SARG, 'N', 5, NULL , &States[S_SARG_RAISE+1]),
|
||||
S_NORMAL (SARG, 'M', 5, NULL , &States[S_SARG_RAISE+2]),
|
||||
S_NORMAL (SARG, 'L', 5, NULL , &States[S_SARG_RAISE+3]),
|
||||
S_NORMAL (SARG, 'K', 5, NULL , &States[S_SARG_RAISE+4]),
|
||||
S_NORMAL (SARG, 'J', 5, NULL , &States[S_SARG_RAISE+5]),
|
||||
S_NORMAL (SARG, 'I', 5, NULL , &States[S_SARG_RUN+0])
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (ADemon, Doom, 3002, 8)
|
||||
PROP_SpawnHealth (150)
|
||||
PROP_PainChance (180)
|
||||
PROP_SpeedFixed (10)
|
||||
PROP_RadiusFixed (30)
|
||||
PROP_HeightFixed (56)
|
||||
PROP_Mass (400)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
|
||||
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP)
|
||||
PROP_Flags5 (MF5_FASTER|MF5_FASTMELEE)
|
||||
|
||||
PROP_SpawnState (S_SARG_STND)
|
||||
PROP_SeeState (S_SARG_RUN)
|
||||
PROP_PainState (S_SARG_PAIN)
|
||||
PROP_MeleeState (S_SARG_ATK)
|
||||
PROP_DeathState (S_SARG_DIE)
|
||||
PROP_RaiseState (S_SARG_RAISE)
|
||||
|
||||
PROP_SeeSound ("demon/sight")
|
||||
PROP_AttackSound ("demon/melee")
|
||||
PROP_PainSound ("demon/pain")
|
||||
PROP_DeathSound ("demon/death")
|
||||
PROP_ActiveSound ("demon/active")
|
||||
PROP_HitObituary("$OB_DEMONHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
class ASpectre : public ADemon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ASpectre, ADemon)
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ASpectre, Doom, 58, 9)
|
||||
PROP_FlagsSet (MF_SHADOW)
|
||||
PROP_RenderStyle (STYLE_OptFuzzy)
|
||||
PROP_Alpha (FRACUNIT/5)
|
||||
|
||||
PROP_SeeSound ("spectre/sight")
|
||||
PROP_AttackSound ("spectre/melee")
|
||||
PROP_PainSound ("spectre/pain")
|
||||
PROP_DeathSound ("spectre/death")
|
||||
PROP_ActiveSound ("spectre/active")
|
||||
PROP_HitObituary("$OB_SPECTREHIT")
|
||||
END_DEFAULTS
|
||||
|
||||
void A_SargAttack (AActor *self)
|
||||
{
|
||||
if (!self->target)
|
||||
|
|
@ -110,7 +17,7 @@ void A_SargAttack (AActor *self)
|
|||
if (self->CheckMeleeRange ())
|
||||
{
|
||||
int damage = ((pr_sargattack()%10)+1)*4;
|
||||
P_DamageMobj (self->target, self, self, damage, MOD_HIT);
|
||||
P_DamageMobj (self->target, self, self, damage, NAME_Melee);
|
||||
P_TraceBleed (damage, self->target, self);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue