diff --git a/docs/rh-log.txt b/docs/rh-log.txt index a5f7b6e57..ec1efb083 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +November 27, 2009 (Changes by Graf Zahl) +- fixed: The charge attack of Heretic's imp is not precisely the same + as A_SkullAttack with a different speed so A_ImpMsAttack has been + reinstated. + November 25, 2009 - Make the palette indexes used by FRemapTable subject to the global remap table, just as the images they translate are. diff --git a/src/g_doom/a_lostsoul.cpp b/src/g_doom/a_lostsoul.cpp index c648afaba..b6c2ee067 100644 --- a/src/g_doom/a_lostsoul.cpp +++ b/src/g_doom/a_lostsoul.cpp @@ -19,7 +19,6 @@ // SkullAttack // Fly at the player like a missile. // -#define SKULLSPEED (20*FRACUNIT) void A_SkullAttack(AActor *self, fixed_t speed) { @@ -55,8 +54,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullAttack) A_SkullAttack(self, n); } - - DEFINE_ACTION_FUNCTION(AActor, A_BetaSkullAttack) { int damage; diff --git a/src/g_doom/a_painelemental.cpp b/src/g_doom/a_painelemental.cpp index bf0d0501b..c52137919 100644 --- a/src/g_doom/a_painelemental.cpp +++ b/src/g_doom/a_painelemental.cpp @@ -22,9 +22,6 @@ static const PClass *GetSpawnType(DECLARE_PARAMINFO) } -#define SKULLSPEED (20*FRACUNIT) -void A_SkullAttack(AActor *self, fixed_t speed); - // // A_PainShootSkull // Spawn a lost soul and launch it at the target diff --git a/src/g_heretic/a_hereticimp.cpp b/src/g_heretic/a_hereticimp.cpp index b2c92426e..221fe49fb 100644 --- a/src/g_heretic/a_hereticimp.cpp +++ b/src/g_heretic/a_hereticimp.cpp @@ -9,8 +9,26 @@ #include "thingdef/thingdef.h" */ +static FRandom pr_impmsatk ("ImpMsAttack"); static FRandom pr_imp ("ImpExplode"); + +//---------------------------------------------------------------------------- +// +// PROC A_ImpMsAttack +// +//---------------------------------------------------------------------------- + +DEFINE_ACTION_FUNCTION(AActor, A_ImpMsAttack) +{ + if (!self->target || pr_impmsatk() > 64) + { + self->SetState (self->SeeState); + return; + } + A_SkullAttack(self, 12 * FRACUNIT); +} + //---------------------------------------------------------------------------- // // PROC A_ImpExplode diff --git a/src/p_enemy.h b/src/p_enemy.h index ae259806a..a7386ccf5 100644 --- a/src/p_enemy.h +++ b/src/p_enemy.h @@ -76,4 +76,7 @@ bool CheckBossDeath (AActor *); int P_Massacre (); bool P_CheckMissileRange (AActor *actor); +#define SKULLSPEED (20*FRACUNIT) +void A_SkullAttack(AActor *self, fixed_t speed); + #endif //__P_ENEMY_H__ diff --git a/wadsrc/static/actors/heretic/hereticimp.txt b/wadsrc/static/actors/heretic/hereticimp.txt index 1d663b662..25f64a2ea 100644 --- a/wadsrc/static/actors/heretic/hereticimp.txt +++ b/wadsrc/static/actors/heretic/hereticimp.txt @@ -25,6 +25,7 @@ ACTOR HereticImp 66 Obituary "$OB_HERETICIMP" HitObituary "$OB_HERETICIMPHIT" + action native A_ImpMsAttack(); action native A_ImpDeath(); action native A_ImpXDeath1(); action native A_ImpExplode(); @@ -44,7 +45,7 @@ ACTOR HereticImp 66 Goto See Missile: IMPX A 10 A_FaceTarget - IMPX B 6 A_SkullAttack(12) + IMPX B 6 A_ImpMsAttack IMPX CBAB 6 Goto Missile+2 Pain: