ref: 9bd7fbd74b9e876a461a0100bdc4ae5c08d5a7c9
parent: d609cd45c8165c3a34e22ef1d8a09378d2f05503
parent: 71bd1afea1830cd2623313d208104847e2c2e286
author: Turo Lamminen <[email protected]>
date: Tue Nov 8 09:34:16 EST 2022
Merge pull request #1544 from turol/clang-15-fix Fix Hexen state action functions for Clang 15
--- a/src/hexen/a_action.c
+++ b/src/hexen/a_action.c
@@ -143,7 +143,7 @@
//
//============================================================================
-void A_PotteryExplode(mobj_t * actor)
+void A_PotteryExplode(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo = NULL;
int i;
@@ -176,7 +176,7 @@
//
//============================================================================
-void A_PotteryChooseBit(mobj_t * actor)
+void A_PotteryChooseBit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SetMobjState(actor, actor->info->deathstate + (P_Random() % 5) + 1);
actor->tics = 256 + (P_Random() << 1);
@@ -188,7 +188,7 @@
//
//============================================================================
-void A_PotteryCheck(mobj_t * actor)
+void A_PotteryCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int i;
mobj_t *pmo;
@@ -233,7 +233,7 @@
//
//============================================================================
-void A_CorpseBloodDrip(mobj_t * actor)
+void A_CorpseBloodDrip(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_Random() > 128)
{
@@ -249,7 +249,7 @@
//
//============================================================================
-void A_CorpseExplode(mobj_t * actor)
+void A_CorpseExplode(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int i;
@@ -281,7 +281,7 @@
//
//============================================================================
-void A_LeafSpawn(mobj_t * actor)
+void A_LeafSpawn(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int i;
@@ -312,7 +312,7 @@
//
//============================================================================
-void A_LeafThrust(mobj_t * actor)
+void A_LeafThrust(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_Random() > 96)
{
@@ -327,7 +327,7 @@
//
//============================================================================
-void A_LeafCheck(mobj_t * actor)
+void A_LeafCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->special1.i++;
if (actor->special1.i >= 20)
@@ -403,7 +403,7 @@
// target pointer to center mobj
// args[0] angle of ball
-void A_BridgeOrbit(mobj_t * actor)
+void A_BridgeOrbit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->target->special1.i)
{
@@ -416,7 +416,7 @@
}
-void A_BridgeInit(mobj_t * actor)
+void A_BridgeInit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
byte startangle;
mobj_t *ball1, *ball2, *ball3;
@@ -443,9 +443,9 @@
ball3->args[0] = (startangle + 170) & 255;
ball3->target = actor;
- A_BridgeOrbit(ball1);
- A_BridgeOrbit(ball2);
- A_BridgeOrbit(ball3);
+ A_BridgeOrbit(ball1, NULL, NULL);
+ A_BridgeOrbit(ball2, NULL, NULL);
+ A_BridgeOrbit(ball3, NULL, NULL);
}
void A_BridgeRemove(mobj_t * actor)
@@ -488,7 +488,7 @@
//
//==========================================================================
-void A_HideThing(mobj_t * actor)
+void A_HideThing(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 |= MF2_DONTDRAW;
}
@@ -499,7 +499,7 @@
//
//==========================================================================
-void A_UnHideThing(mobj_t * actor)
+void A_UnHideThing(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_DONTDRAW;
}
@@ -510,7 +510,7 @@
//
//==========================================================================
-void A_SetShootable(mobj_t * actor)
+void A_SetShootable(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_NONSHOOTABLE;
actor->flags |= MF_SHOOTABLE;
@@ -522,7 +522,7 @@
//
//==========================================================================
-void A_UnSetShootable(mobj_t * actor)
+void A_UnSetShootable(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 |= MF2_NONSHOOTABLE;
actor->flags &= ~MF_SHOOTABLE;
@@ -534,7 +534,7 @@
//
//==========================================================================
-void A_SetAltShadow(mobj_t * actor)
+void A_SetAltShadow(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags &= ~MF_SHADOW;
actor->flags |= MF_ALTSHADOW;
@@ -565,7 +565,7 @@
//
//==========================================================================
-void A_ContMobjSound(mobj_t * actor)
+void A_ContMobjSound(mobj_t *actor, player_t *player, pspdef_t *psp)
{
switch (actor->type)
{
@@ -589,7 +589,7 @@
//
//==========================================================================
-void A_ESound(mobj_t * mo)
+void A_ESound(mobj_t *mo, player_t *player, pspdef_t *psp)
{
int sound;
@@ -612,7 +612,7 @@
//==========================================================================
-void A_Summon(mobj_t * actor)
+void A_Summon(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
mobj_t *master;
@@ -667,7 +667,7 @@
//
//==========================================================================
-void A_FogSpawn(mobj_t * actor)
+void A_FogSpawn(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo = NULL;
angle_t delta;
@@ -708,7 +708,7 @@
}
-void A_FogMove(mobj_t * actor)
+void A_FogMove(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int speed = actor->args[0] << FRACBITS;
angle_t angle;
@@ -741,7 +741,7 @@
//
//===========================================================================
-void A_PoisonBagInit(mobj_t * actor)
+void A_PoisonBagInit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -766,7 +766,7 @@
//
//===========================================================================
-void A_PoisonBagCheck(mobj_t * actor)
+void A_PoisonBagCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!--actor->special1.i)
{
@@ -784,11 +784,11 @@
//
//===========================================================================
-void A_PoisonBagDamage(mobj_t * actor)
+void A_PoisonBagDamage(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int bobIndex;
- A_Explode(actor);
+ A_Explode(actor, player, psp);
bobIndex = actor->special2.i;
actor->z += FloatBobOffsets[bobIndex] >> 4;
@@ -801,7 +801,7 @@
//
//===========================================================================
-void A_PoisonShroom(mobj_t * actor)
+void A_PoisonShroom(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->tics = 128 + (P_Random() << 1);
}
@@ -812,7 +812,7 @@
//
//===========================================================================
-void A_CheckThrowBomb(mobj_t * actor)
+void A_CheckThrowBomb(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (abs(actor->momx) < 1.5 * FRACUNIT && abs(actor->momy) < 1.5 * FRACUNIT
&& actor->momz < 2 * FRACUNIT
@@ -885,7 +885,7 @@
//===========================================================================
int localQuakeHappening[MAXPLAYERS];
-void A_Quake(mobj_t * actor)
+void A_Quake(mobj_t *actor, player_t *player_param, pspdef_t *psp)
{
angle_t an;
player_t *player;
@@ -944,7 +944,7 @@
#define TELEPORT_LIFE 1
-void A_TeloSpawnA(mobj_t * actor)
+void A_TeloSpawnA(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -960,7 +960,7 @@
}
}
-void A_TeloSpawnB(mobj_t * actor)
+void A_TeloSpawnB(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -976,7 +976,7 @@
}
}
-void A_TeloSpawnC(mobj_t * actor)
+void A_TeloSpawnC(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -992,7 +992,7 @@
}
}
-void A_TeloSpawnD(mobj_t * actor)
+void A_TeloSpawnD(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -1008,7 +1008,7 @@
}
}
-void A_CheckTeleRing(mobj_t * actor)
+void A_CheckTeleRing(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->special1.i-- <= 0)
{
@@ -1076,7 +1076,7 @@
// args[1] 0 = normal, 1 = bloody
//===========================================================================
-void A_ThrustInitUp(mobj_t * actor)
+void A_ThrustInitUp(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->special2.i = 5; // Raise speed
actor->args[0] = 1; // Mark as up
@@ -1086,7 +1086,7 @@
actor->special1.m = NULL;
}
-void A_ThrustInitDn(mobj_t * actor)
+void A_ThrustInitDn(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
actor->special2.i = 5; // Raise speed
@@ -1099,7 +1099,7 @@
}
-void A_ThrustRaise(mobj_t * actor)
+void A_ThrustRaise(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (A_RaiseMobj(actor))
{ // Reached it's target height
@@ -1123,7 +1123,7 @@
actor->special2.i++; // Increase raise speed
}
-void A_ThrustLower(mobj_t * actor)
+void A_ThrustLower(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (A_SinkMobj(actor))
{
@@ -1135,12 +1135,12 @@
}
}
-void A_ThrustBlock(mobj_t * actor)
+void A_ThrustBlock(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags |= MF_SOLID;
}
-void A_ThrustImpale(mobj_t * actor)
+void A_ThrustImpale(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// Impale all shootables in radius
PIT_ThrustSpike(actor);
@@ -1152,7 +1152,7 @@
//
//===========================================================================
-void A_SoAExplode(mobj_t * actor)
+void A_SoAExplode(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int i;
@@ -1194,7 +1194,7 @@
//
//===========================================================================
-void A_BellReset1(mobj_t * actor)
+void A_BellReset1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags |= MF_NOGRAVITY;
actor->height <<= 2;
@@ -1206,7 +1206,7 @@
//
//===========================================================================
-void A_BellReset2(mobj_t * actor)
+void A_BellReset2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags |= MF_SHOOTABLE;
actor->flags &= ~MF_CORPSE;
@@ -1220,7 +1220,7 @@
//
//===========================================================================
-void A_FlameCheck(mobj_t * actor)
+void A_FlameCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->args[0]--) // Called every 8 tics
{
@@ -1244,12 +1244,12 @@
// args[4] turn amount per move (in degrees)
//===========================================================================
-void A_BatSpawnInit(mobj_t * actor)
+void A_BatSpawnInit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->special1.i = 0; // Frequency count
}
-void A_BatSpawn(mobj_t * actor)
+void A_BatSpawn(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int delta;
@@ -1275,7 +1275,7 @@
}
-void A_BatMove(mobj_t * actor)
+void A_BatMove(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t newangle;
fixed_t speed;
@@ -1315,7 +1315,7 @@
//
//===========================================================================
-void A_TreeDeath(mobj_t * actor)
+void A_TreeDeath(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!(actor->flags2 & MF2_FIREDAMAGE))
{
@@ -1337,7 +1337,7 @@
//
//===========================================================================
-void A_NoGravity(mobj_t * actor)
+void A_NoGravity(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags |= MF_NOGRAVITY;
}
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -351,7 +351,7 @@
NUMPSPRITES
} psprnum_t;
-typedef struct
+typedef struct pspdef_s
{
state_t *state; // a NULL state means not active
int tics;
--- a/src/hexen/info.h
+++ b/src/hexen/info.h
@@ -3182,7 +3182,7 @@
spritenum_t sprite;
int frame;
int tics;
- void (*action) ();
+ void (*action) (struct mobj_s *, struct player_s *, struct pspdef_s *);
statenum_t nextstate;
int misc1, misc2;
} state_t;
--- a/src/hexen/p_action.h
+++ b/src/hexen/p_action.h
@@ -21,220 +21,220 @@
#define HEXEN_P_ACTION_H
-void A_FreeTargMobj(mobj_t *actor);
-void A_FlameCheck(mobj_t *actor);
-void A_HideThing(mobj_t *actor);
-void A_RestoreSpecialThing1(mobj_t *thing);
-void A_RestoreSpecialThing2(mobj_t *thing);
-void A_RestoreArtifact(mobj_t *arti);
-void A_Summon(mobj_t *actor);
-void A_ThrustInitUp(mobj_t *actor);
-void A_ThrustInitDn(mobj_t *actor);
-void A_ThrustRaise(mobj_t *actor);
-void A_ThrustBlock(mobj_t *actor);
-void A_ThrustImpale(mobj_t *actor);
-void A_ThrustLower(mobj_t *actor);
-void A_TeloSpawnC(mobj_t *actor);
-void A_TeloSpawnB(mobj_t *actor);
-void A_TeloSpawnA(mobj_t *actor);
-void A_TeloSpawnD(mobj_t *actor);
-void A_CheckTeleRing(mobj_t *actor);
-void A_FogSpawn(mobj_t *actor);
-void A_FogMove(mobj_t *actor);
-void A_Quake(mobj_t *actor);
-void A_ContMobjSound(mobj_t *actor);
-void A_Scream(mobj_t *actor);
-void A_PoisonBagInit(mobj_t *actor);
-void A_PoisonBagDamage(mobj_t *actor);
-void A_PoisonBagCheck(mobj_t *actor);
-void A_CheckThrowBomb(mobj_t *actor);
-void A_NoGravity(mobj_t *actor);
-void A_PotteryExplode(mobj_t *actor);
-void A_PotteryChooseBit(mobj_t *actor);
-void A_PotteryCheck(mobj_t *actor);
-void A_CorpseBloodDrip(mobj_t *actor);
-void A_CorpseExplode(mobj_t *actor);
-void A_LeafSpawn(mobj_t *actor);
-void A_LeafThrust(mobj_t *actor);
-void A_LeafCheck(mobj_t *actor);
-void A_BridgeInit(mobj_t *actor);
-void A_BridgeOrbit(mobj_t *actor);
-void A_TreeDeath(mobj_t *actor);
-void A_PoisonShroom(mobj_t *actor);
-void A_Pain(mobj_t *actor);
-void A_SoAExplode(mobj_t *actor);
-void A_BellReset1(mobj_t *actor);
-void A_BellReset2(mobj_t *actor);
-void A_Light0(player_t *player, pspdef_t *psp);
-void A_WeaponReady(player_t *player, pspdef_t *psp);
-void A_Lower(player_t *player, pspdef_t *psp);
-void A_Raise(player_t *player, pspdef_t *psp);
-void A_FPunchAttack(player_t *player, pspdef_t *psp);
-void A_ReFire(player_t *player, pspdef_t *psp);
-void A_FAxeAttack(player_t *player, pspdef_t *psp);
-void A_FHammerAttack(player_t *player, pspdef_t *psp);
-void A_FHammerThrow(player_t *player, pspdef_t *psp);
-void A_FSwordAttack(player_t *player, pspdef_t *psp);
-void A_FSwordFlames(mobj_t *actor);
-void A_CMaceAttack(player_t *player, pspdef_t *psp);
-void A_CStaffInitBlink(player_t *player, pspdef_t *psp);
-void A_CStaffCheckBlink(player_t *player, pspdef_t *psp);
-void A_CStaffCheck(player_t * player, pspdef_t *psp);
-void A_CStaffAttack(player_t *player, pspdef_t *psp);
-void A_CStaffMissileSlither(mobj_t *actor);
-void A_CFlameAttack(player_t *player, pspdef_t *psp);
-void A_CFlameRotate(mobj_t *actor);
-void A_CFlamePuff(mobj_t *actor);
-void A_CFlameMissile(mobj_t *actor);
-void A_CHolyAttack(player_t *player, pspdef_t *psp);
-void A_CHolyPalette(player_t *player, pspdef_t *psp);
-void A_CHolySeek(mobj_t *actor);
-void A_CHolyCheckScream(mobj_t *actor);
-void A_CHolyTail(mobj_t *actor);
-void A_CHolySpawnPuff(mobj_t *actor);
-void A_CHolyAttack2(mobj_t *actor);
-void A_MWandAttack(player_t *player, pspdef_t *psp);
-void A_LightningReady(player_t *player, pspdef_t *psp);
-void A_MLightningAttack(player_t *player, pspdef_t *psp);
-void A_LightningZap(mobj_t *actor);
-void A_LightningClip(mobj_t *actor);
-void A_LightningRemove(mobj_t *actor);
-void A_LastZap(mobj_t *actor);
-void A_ZapMimic(mobj_t *actor);
-void A_MStaffAttack(player_t *player, pspdef_t *psp);
-void A_MStaffPalette(player_t *player, pspdef_t *psp);
-void A_MStaffWeave(mobj_t *actor);
-void A_MStaffTrack(mobj_t *actor);
-void A_SnoutAttack(player_t *player, pspdef_t *psp);
-void A_FireConePL1(player_t * player, pspdef_t *psp);
-void A_ShedShard(mobj_t *actor);
-void A_AddPlayerCorpse(mobj_t *actor);
-void A_SkullPop(mobj_t *actor);
-void A_FreezeDeath(mobj_t *actor);
-void A_CheckBurnGone(mobj_t *actor);
-void A_CheckSkullFloor(mobj_t *actor);
-void A_CheckSkullDone(mobj_t *actor);
-void A_SpeedFade(mobj_t *actor);
-void A_IceSetTics(mobj_t *actor);
-void A_IceCheckHeadDone(mobj_t *actor);
-void A_PigPain(mobj_t *actor);
-void A_PigLook(mobj_t *actor);
-void A_PigChase(mobj_t *actor);
-void A_FaceTarget(mobj_t *actor);
-void A_PigAttack(mobj_t *actor);
-void A_QueueCorpse(mobj_t *actor);
-void A_Look(mobj_t *actor);
-void A_Chase(mobj_t *actor);
-void A_CentaurAttack(mobj_t *actor);
-void A_CentaurAttack2(mobj_t *actor);
-void A_SetReflective(mobj_t *actor);
-void A_CentaurDefend(mobj_t *actor);
-void A_UnSetReflective(mobj_t *actor);
-void A_CentaurDropStuff(mobj_t *actor);
-void A_CheckFloor(mobj_t *actor);
-void A_DemonAttack1(mobj_t *actor);
-void A_DemonAttack2(mobj_t *actor);
-void A_DemonDeath(mobj_t *actor);
-void A_Demon2Death(mobj_t *actor);
-void A_WraithRaiseInit(mobj_t *actor);
-void A_WraithRaise(mobj_t *actor);
-void A_WraithInit(mobj_t *actor);
-void A_WraithLook(mobj_t *actor);
-void A_WraithChase(mobj_t *actor);
-void A_WraithFX3(mobj_t *actor);
-void A_WraithMelee(mobj_t *actor);
-void A_WraithMissile(mobj_t *actor);
-void A_WraithFX2(mobj_t *actor);
-void A_MinotaurFade1(mobj_t *actor);
-void A_MinotaurFade2(mobj_t *actor);
-void A_MinotaurChase(mobj_t *actor);
-void A_MinotaurRoam(mobj_t *actor);
-void A_MinotaurAtk1(mobj_t *actor);
-void A_MinotaurDecide(mobj_t *actor);
-void A_MinotaurAtk2(mobj_t *actor);
-void A_MinotaurAtk3(mobj_t *actor);
-void A_MinotaurCharge(mobj_t *actor);
-void A_SmokePuffExit(mobj_t *actor);
-void A_MinotaurFade0(mobj_t *actor);
-void A_MntrFloorFire(mobj_t *actor);
-void A_SerpentChase(mobj_t *actor);
-void A_SerpentHumpDecide(mobj_t *actor);
-void A_SerpentUnHide(mobj_t *actor);
-void A_SerpentRaiseHump(mobj_t *actor);
-void A_SerpentLowerHump(mobj_t *actor);
-void A_SerpentHide(mobj_t *actor);
-void A_SerpentBirthScream(mobj_t *actor);
-void A_SetShootable(mobj_t *actor);
-void A_SerpentCheckForAttack(mobj_t *actor);
-void A_UnSetShootable(mobj_t *actor);
-void A_SerpentDiveSound(mobj_t *actor);
-void A_SerpentWalk(mobj_t *actor);
-void A_SerpentChooseAttack(mobj_t *actor);
-void A_SerpentMeleeAttack(mobj_t *actor);
-void A_SerpentMissileAttack(mobj_t *actor);
-void A_SerpentHeadPop(mobj_t *actor);
-void A_SerpentSpawnGibs(mobj_t *actor);
-void A_SerpentHeadCheck(mobj_t *actor);
-void A_FloatGib(mobj_t *actor);
-void A_DelayGib(mobj_t *actor);
-void A_SinkGib(mobj_t *actor);
-void A_BishopDecide(mobj_t *actor);
-void A_BishopDoBlur(mobj_t *actor);
-void A_BishopSpawnBlur(mobj_t *actor);
-void A_BishopChase(mobj_t *actor);
-void A_BishopAttack(mobj_t *actor);
-void A_BishopAttack2(mobj_t *actor);
-void A_BishopPainBlur(mobj_t *actor);
-void A_BishopPuff(mobj_t *actor);
-void A_SetAltShadow(mobj_t *actor);
-void A_BishopMissileWeave(mobj_t *actor);
-void A_BishopMissileSeek(mobj_t *actor);
-void A_DragonInitFlight(mobj_t *actor);
-void A_DragonFlap(mobj_t *actor);
-void A_DragonFlight(mobj_t *actor);
-void A_DragonAttack(mobj_t *actor);
-void A_DragonPain(mobj_t *actor);
-void A_DragonCheckCrash(mobj_t *actor);
-void A_DragonFX2(mobj_t *actor);
-void A_ESound(mobj_t *mo);
-void A_EttinAttack(mobj_t *actor);
-void A_DropMace(mobj_t *actor);
-void A_FiredRocks(mobj_t *actor);
-void A_UnSetInvulnerable(mobj_t *actor);
-void A_FiredChase(mobj_t *actor);
-void A_FiredAttack(mobj_t *actor);
-void A_FiredSplotch(mobj_t *actor);
-void A_SmBounce(mobj_t *actor);
-void A_IceGuyLook(mobj_t *actor);
-void A_IceGuyChase(mobj_t *actor);
-void A_IceGuyAttack(mobj_t *actor);
-void A_IceGuyDie(mobj_t *actor);
-void A_IceGuyMissilePuff(mobj_t *actor);
-void A_IceGuyMissileExplode(mobj_t *actor);
-void A_ClassBossHealth(mobj_t *actor);
-void A_FastChase(mobj_t *actor);
-void A_FighterAttack(mobj_t *actor);
-void A_ClericAttack(mobj_t *actor);
-void A_MageAttack(mobj_t *actor);
-void A_SorcBallPop(mobj_t *actor);
-void A_SorcFX2Split(mobj_t *actor);
-void A_SorcFX2Orbit(mobj_t *actor);
-void A_SorcererBishopEntry(mobj_t *actor);
-void A_SpawnBishop(mobj_t *actor);
-void A_SorcFX4Check(mobj_t *actor);
-void A_KoraxStep2(mobj_t *actor);
-void A_KoraxChase(mobj_t *actor);
-void A_KoraxStep(mobj_t *actor);
-void A_KoraxDecide(mobj_t *actor);
-void A_KoraxMissile(mobj_t *actor);
-void A_KoraxCommand(mobj_t *actor);
-void A_KoraxBonePop(mobj_t *actor);
-void A_KSpiritRoam(mobj_t *actor);
-void A_KBoltRaise(mobj_t *actor);
-void A_KBolt(mobj_t *actor);
-void A_BatSpawnInit(mobj_t *actor);
-void A_BatSpawn(mobj_t *actor);
-void A_BatMove(mobj_t *actor);
+void A_FreeTargMobj(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FlameCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_HideThing(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_RestoreSpecialThing1(mobj_t *thing, player_t *player, pspdef_t *psp);
+void A_RestoreSpecialThing2(mobj_t *thing, player_t *player, pspdef_t *psp);
+void A_RestoreArtifact(mobj_t *arti, player_t *player, pspdef_t *psp);
+void A_Summon(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustInitUp(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustInitDn(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustRaise(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustBlock(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustImpale(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ThrustLower(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_TeloSpawnC(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_TeloSpawnB(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_TeloSpawnA(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_TeloSpawnD(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckTeleRing(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FogSpawn(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FogMove(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Quake(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ContMobjSound(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Scream(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PoisonBagInit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PoisonBagDamage(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PoisonBagCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckThrowBomb(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_NoGravity(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PotteryExplode(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PotteryChooseBit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PotteryCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CorpseBloodDrip(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CorpseExplode(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LeafSpawn(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LeafThrust(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LeafCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BridgeInit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BridgeOrbit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_TreeDeath(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PoisonShroom(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Pain(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SoAExplode(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BellReset1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BellReset2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Light0(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WeaponReady(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Lower(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Raise(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FPunchAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ReFire(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FAxeAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FHammerAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FHammerThrow(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FSwordAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FSwordFlames(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CMaceAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CStaffInitBlink(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CStaffCheckBlink(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CStaffCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CStaffAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CStaffMissileSlither(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CFlameAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CFlameRotate(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CFlamePuff(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CFlameMissile(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyPalette(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolySeek(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyCheckScream(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyTail(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolySpawnPuff(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MWandAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LightningReady(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MLightningAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LightningZap(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LightningClip(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LightningRemove(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_LastZap(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ZapMimic(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MStaffAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MStaffPalette(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MStaffWeave(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MStaffTrack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SnoutAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FireConePL1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ShedShard(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_AddPlayerCorpse(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SkullPop(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FreezeDeath(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckBurnGone(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckSkullFloor(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckSkullDone(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SpeedFade(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceSetTics(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceCheckHeadDone(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PigPain(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PigLook(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PigChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FaceTarget(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_PigAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_QueueCorpse(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Look(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Chase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CentaurAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CentaurAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SetReflective(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CentaurDefend(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_UnSetReflective(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CentaurDropStuff(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CheckFloor(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DemonAttack1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DemonAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DemonDeath(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_Demon2Death(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithRaiseInit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithRaise(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithInit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithLook(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithFX3(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithMelee(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithMissile(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_WraithFX2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurFade1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurFade2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurRoam(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurAtk1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurDecide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurAtk2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurAtk3(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurCharge(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SmokePuffExit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurFade0(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MntrFloorFire(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentHumpDecide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentUnHide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentRaiseHump(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentLowerHump(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentHide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentBirthScream(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SetShootable(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentCheckForAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_UnSetShootable(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentDiveSound(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentWalk(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentChooseAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentMeleeAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentMissileAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentHeadPop(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentSpawnGibs(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SerpentHeadCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FloatGib(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DelayGib(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SinkGib(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopDecide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopDoBlur(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopSpawnBlur(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopPainBlur(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopPuff(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SetAltShadow(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopMissileWeave(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BishopMissileSeek(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonInitFlight(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonFlap(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonFlight(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonPain(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonCheckCrash(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DragonFX2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ESound(mobj_t *mo, player_t *player, pspdef_t *psp);
+void A_EttinAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DropMace(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FiredRocks(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_UnSetInvulnerable(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FiredChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FiredAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FiredSplotch(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SmBounce(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyLook(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyDie(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyMissilePuff(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_IceGuyMissileExplode(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ClassBossHealth(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FastChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FighterAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_ClericAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MageAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcBallPop(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcFX2Split(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcFX2Orbit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcererBishopEntry(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SpawnBishop(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcFX4Check(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxStep2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxChase(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxStep(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxDecide(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxMissile(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxCommand(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KoraxBonePop(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KSpiritRoam(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KBoltRaise(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_KBolt(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BatSpawnInit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BatSpawn(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BatMove(mobj_t *actor, player_t *player, pspdef_t *psp);
#endif // HEXEN_P_ACTION_H
--- a/src/hexen/p_enemy.c
+++ b/src/hexen/p_enemy.c
@@ -616,7 +616,7 @@
==============
*/
-void A_Look(mobj_t * actor)
+void A_Look(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *targ;
@@ -668,7 +668,7 @@
==============
*/
-void A_Chase(mobj_t * actor)
+void A_Chase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int delta;
@@ -805,7 +805,7 @@
//
//----------------------------------------------------------------------------
-void A_FaceTarget(mobj_t * actor)
+void A_FaceTarget(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -826,7 +826,7 @@
//
//----------------------------------------------------------------------------
-void A_Pain(mobj_t * actor)
+void A_Pain(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->info->painsound)
{
@@ -840,7 +840,7 @@
//
//============================================================================
-void A_SetInvulnerable(mobj_t * actor)
+void A_SetInvulnerable(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 |= MF2_INVULNERABLE;
}
@@ -851,7 +851,7 @@
//
//============================================================================
-void A_UnSetInvulnerable(mobj_t * actor)
+void A_UnSetInvulnerable(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_INVULNERABLE;
}
@@ -862,13 +862,13 @@
//
//============================================================================
-void A_SetReflective(mobj_t * actor)
+void A_SetReflective(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 |= MF2_REFLECTIVE;
if ((actor->type == MT_CENTAUR) || (actor->type == MT_CENTAURLEADER))
{
- A_SetInvulnerable(actor);
+ A_SetInvulnerable(actor, player, psp);
}
}
@@ -878,13 +878,13 @@
//
//============================================================================
-void A_UnSetReflective(mobj_t * actor)
+void A_UnSetReflective(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_REFLECTIVE;
if ((actor->type == MT_CENTAUR) || (actor->type == MT_CENTAURLEADER))
{
- A_UnSetInvulnerable(actor);
+ A_UnSetInvulnerable(actor, player, psp);
}
}
@@ -965,13 +965,13 @@
//
//----------------------------------------------------------------------------
-void A_PigLook(mobj_t * actor)
+void A_PigLook(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_UpdateMorphedMonster(actor, 10))
{
return;
}
- A_Look(actor);
+ A_Look(actor, player, psp);
}
//----------------------------------------------------------------------------
@@ -980,13 +980,13 @@
//
//----------------------------------------------------------------------------
-void A_PigChase(mobj_t * actor)
+void A_PigChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_UpdateMorphedMonster(actor, 3))
{
return;
}
- A_Chase(actor);
+ A_Chase(actor, player, psp);
}
//============================================================================
@@ -995,7 +995,7 @@
//
//============================================================================
-void A_PigAttack(mobj_t * actor)
+void A_PigAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_UpdateMorphedMonster(actor, 18))
{
@@ -1018,9 +1018,9 @@
//
//============================================================================
-void A_PigPain(mobj_t * actor)
+void A_PigPain(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_Pain(actor);
+ A_Pain(actor, player, psp);
if (actor->z <= actor->floorz)
{
actor->momz = 3.5 * FRACUNIT;
@@ -1074,13 +1074,13 @@
// args[4] charge duration countdown
//----------------------------------------------------------------------------
-void A_MinotaurFade0(mobj_t * actor)
+void A_MinotaurFade0(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags &= ~MF_ALTSHADOW;
actor->flags |= MF_SHADOW;
}
-void A_MinotaurFade1(mobj_t * actor)
+void A_MinotaurFade1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// Second level of transparency
actor->flags &= ~MF_SHADOW;
@@ -1087,7 +1087,7 @@
actor->flags |= MF_ALTSHADOW;
}
-void A_MinotaurFade2(mobj_t * actor)
+void A_MinotaurFade2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// Make fully visible
actor->flags &= ~MF_SHADOW;
@@ -1123,7 +1123,7 @@
return true;
}
-void A_MinotaurRoam(mobj_t * actor)
+void A_MinotaurRoam(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags &= ~MF_SHADOW; // In case pain caused him to
actor->flags &= ~MF_ALTSHADOW; // skip his fade in.
@@ -1134,7 +1134,7 @@
}
if (P_Random() < 30)
- A_MinotaurLook(actor); // adjust to closest target
+ A_MinotaurLook(actor, player, psp); // adjust to closest target
if (P_Random() < 6)
{
@@ -1162,7 +1162,7 @@
//----------------------------------------------------------------------------
#define MINOTAUR_LOOK_DIST (16*54*FRACUNIT)
-void A_MinotaurLook(mobj_t * actor)
+void A_MinotaurLook(mobj_t *actor, player_t *player_, pspdef_t *psp)
{
mobj_t *mo = NULL;
player_t *player;
@@ -1241,7 +1241,7 @@
-void A_MinotaurChase(mobj_t * actor)
+void A_MinotaurChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags &= ~MF_SHADOW; // In case pain caused him to
actor->flags &= ~MF_ALTSHADOW; // skip his fade in.
@@ -1252,7 +1252,7 @@
}
if (P_Random() < 30)
- A_MinotaurLook(actor); // adjust to closest target
+ A_MinotaurLook(actor, player, psp); // adjust to closest target
if (!actor->target || (actor->target->health <= 0) ||
!(actor->target->flags & MF_SHOOTABLE))
@@ -1305,7 +1305,7 @@
//
//----------------------------------------------------------------------------
-void A_MinotaurAtk1(mobj_t * actor)
+void A_MinotaurAtk1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
return;
@@ -1327,7 +1327,7 @@
#define MNTR_CHARGE_SPEED (23*FRACUNIT)
-void A_MinotaurDecide(mobj_t * actor)
+void A_MinotaurDecide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
mobj_t *target = actor->target;
@@ -1345,7 +1345,7 @@
// Don't call the state function right away
P_SetMobjStateNF(actor, S_MNTR_ATK4_1);
actor->flags |= MF_SKULLFLY;
- A_FaceTarget(actor);
+ A_FaceTarget(actor, player, psp);
angle = actor->angle >> ANGLETOFINESHIFT;
actor->momx = FixedMul(MNTR_CHARGE_SPEED, finecosine[angle]);
actor->momy = FixedMul(MNTR_CHARGE_SPEED, finesine[angle]);
@@ -1359,7 +1359,7 @@
}
else
{ // Swing attack
- A_FaceTarget(actor);
+ A_FaceTarget(actor, player, psp);
// Don't need to call P_SetMobjState because the current state
// falls through to the swing attack
}
@@ -1371,7 +1371,7 @@
//
//----------------------------------------------------------------------------
-void A_MinotaurCharge(mobj_t * actor)
+void A_MinotaurCharge(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *puff;
@@ -1399,7 +1399,7 @@
//
//----------------------------------------------------------------------------
-void A_MinotaurAtk2(mobj_t * actor)
+void A_MinotaurAtk2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t angle;
@@ -1435,7 +1435,7 @@
//
//----------------------------------------------------------------------------
-void A_MinotaurAtk3(mobj_t * actor)
+void A_MinotaurAtk3(mobj_t *actor, player_t *player_, pspdef_t *psp)
{
mobj_t *mo;
player_t *player;
@@ -1473,7 +1473,7 @@
//
//----------------------------------------------------------------------------
-void A_MntrFloorFire(mobj_t * actor)
+void A_MntrFloorFire(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int r1, r2;
@@ -1497,7 +1497,7 @@
//
//----------------------------------------------------------------------------
-void A_Scream(mobj_t * actor)
+void A_Scream(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int sound;
@@ -1610,7 +1610,7 @@
//
//----------------------------------------------------------------------------
-void A_NoBlocking(mobj_t * actor)
+void A_NoBlocking(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags &= ~MF_SOLID;
@@ -1635,7 +1635,7 @@
//
//----------------------------------------------------------------------------
-void A_Explode(mobj_t * actor)
+void A_Explode(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int damage;
int distance;
@@ -1759,7 +1759,7 @@
//
//----------------------------------------------------------------------------
-void A_SkullPop(mobj_t * actor)
+void A_SkullPop(mobj_t *actor, player_t *player_, pspdef_t *psp)
{
mobj_t *mo;
player_t *player;
@@ -1793,7 +1793,7 @@
//
//----------------------------------------------------------------------------
-void A_CheckSkullFloor(mobj_t * actor)
+void A_CheckSkullFloor(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->z <= actor->floorz)
{
@@ -1808,7 +1808,7 @@
//
//----------------------------------------------------------------------------
-void A_CheckSkullDone(mobj_t * actor)
+void A_CheckSkullDone(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->special2.i == 666)
{
@@ -1822,7 +1822,7 @@
//
//----------------------------------------------------------------------------
-void A_CheckBurnGone(mobj_t * actor)
+void A_CheckBurnGone(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->special2.i == 666)
{
@@ -1836,7 +1836,7 @@
//
//----------------------------------------------------------------------------
-void A_FreeTargMobj(mobj_t * mo)
+void A_FreeTargMobj(mobj_t *mo, player_t *player, pspdef_t *psp)
{
mo->momx = mo->momy = mo->momz = 0;
mo->z = mo->ceilingz + 4 * FRACUNIT;
@@ -1862,7 +1862,7 @@
int corpseQueueSlot;
// throw another corpse on the queue
-void A_QueueCorpse(mobj_t * actor)
+void A_QueueCorpse(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *corpse;
@@ -1877,7 +1877,7 @@
}
// Remove a mobj from the queue (for resurrection)
-void A_DeQueueCorpse(mobj_t * actor)
+void A_DeQueueCorpse(mobj_t *actor)
{
int slot;
@@ -1939,7 +1939,7 @@
case MT_DEMON2CHUNK5:
case MT_FIREDEMON_SPLOTCH1:
case MT_FIREDEMON_SPLOTCH2:
- A_QueueCorpse(mo); // Add corpse to queue
+ A_QueueCorpse(mo, NULL, NULL); // Add corpse to queue
break;
default:
break;
@@ -1958,7 +1958,7 @@
mobj_t *bodyque[BODYQUESIZE];
int bodyqueslot;
-void A_AddPlayerCorpse(mobj_t * actor)
+void A_AddPlayerCorpse(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (bodyqueslot >= BODYQUESIZE)
{ // Too many player corpses - remove an old one
@@ -1974,7 +1974,7 @@
//
//============================================================================
-void A_SerpentUnHide(mobj_t * actor)
+void A_SerpentUnHide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_DONTDRAW;
actor->floorclip = 24 * FRACUNIT;
@@ -1986,7 +1986,7 @@
//
//============================================================================
-void A_SerpentHide(mobj_t * actor)
+void A_SerpentHide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 |= MF2_DONTDRAW;
actor->floorclip = 0;
@@ -1998,7 +1998,7 @@
//
//============================================================================
-void A_SerpentChase(mobj_t * actor)
+void A_SerpentChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int delta;
int oldX, oldY, oldFloor;
@@ -2115,7 +2115,7 @@
// Raises the hump above the surface by raising the floorclip level
//============================================================================
-void A_SerpentRaiseHump(mobj_t * actor)
+void A_SerpentRaiseHump(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->floorclip -= 4 * FRACUNIT;
}
@@ -2126,7 +2126,7 @@
//
//============================================================================
-void A_SerpentLowerHump(mobj_t * actor)
+void A_SerpentLowerHump(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->floorclip += 4 * FRACUNIT;
}
@@ -2139,7 +2139,7 @@
// to missile attack
//============================================================================
-void A_SerpentHumpDecide(mobj_t * actor)
+void A_SerpentHumpDecide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->type == MT_SERPENTLEADER)
{
@@ -2177,7 +2177,7 @@
//
//============================================================================
-void A_SerpentBirthScream(mobj_t * actor)
+void A_SerpentBirthScream(mobj_t *actor, player_t *player, pspdef_t *psp)
{
S_StartSound(actor, SFX_SERPENT_BIRTH);
}
@@ -2188,7 +2188,7 @@
//
//============================================================================
-void A_SerpentDiveSound(mobj_t * actor)
+void A_SerpentDiveSound(mobj_t *actor, player_t *player, pspdef_t *psp)
{
S_StartSound(actor, SFX_SERPENT_ACTIVE);
}
@@ -2200,7 +2200,7 @@
// Similar to A_Chase, only has a hardcoded entering of meleestate
//============================================================================
-void A_SerpentWalk(mobj_t * actor)
+void A_SerpentWalk(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int delta;
@@ -2298,7 +2298,7 @@
//
//============================================================================
-void A_SerpentCheckForAttack(mobj_t * actor)
+void A_SerpentCheckForAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2335,7 +2335,7 @@
//
//============================================================================
-void A_SerpentChooseAttack(mobj_t * actor)
+void A_SerpentChooseAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target || P_CheckMeleeRange(actor))
{
@@ -2353,7 +2353,7 @@
//
//============================================================================
-void A_SerpentMeleeAttack(mobj_t * actor)
+void A_SerpentMeleeAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2366,7 +2366,7 @@
}
if (P_Random() < 96)
{
- A_SerpentCheckForAttack(actor);
+ A_SerpentCheckForAttack(actor, player, psp);
}
}
@@ -2376,7 +2376,7 @@
//
//============================================================================
-void A_SerpentMissileAttack(mobj_t * actor)
+void A_SerpentMissileAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2392,7 +2392,7 @@
//
//============================================================================
-void A_SerpentHeadPop(mobj_t * actor)
+void A_SerpentHeadPop(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMobj(actor->x, actor->y, actor->z + 45 * FRACUNIT,
MT_SERPENT_HEAD);
@@ -2404,7 +2404,7 @@
//
//============================================================================
-void A_SerpentSpawnGibs(mobj_t * actor)
+void A_SerpentSpawnGibs(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int r1, r2;
@@ -2450,7 +2450,7 @@
//
//============================================================================
-void A_FloatGib(mobj_t * actor)
+void A_FloatGib(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->floorclip -= FRACUNIT;
}
@@ -2461,7 +2461,7 @@
//
//============================================================================
-void A_SinkGib(mobj_t * actor)
+void A_SinkGib(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->floorclip += FRACUNIT;
}
@@ -2472,7 +2472,7 @@
//
//============================================================================
-void A_DelayGib(mobj_t * actor)
+void A_DelayGib(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->tics -= P_Random() >> 2;
}
@@ -2483,7 +2483,7 @@
//
//============================================================================
-void A_SerpentHeadCheck(mobj_t * actor)
+void A_SerpentHeadCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->z <= actor->floorz)
{
@@ -2505,7 +2505,7 @@
//
//============================================================================
-void A_CentaurAttack(mobj_t * actor)
+void A_CentaurAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2523,7 +2523,7 @@
//
//============================================================================
-void A_CentaurAttack2(mobj_t * actor)
+void A_CentaurAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2539,7 +2539,7 @@
//
// Spawn shield/sword sprites when the centaur pulps //============================================================================
-void A_CentaurDropStuff(mobj_t * actor)
+void A_CentaurDropStuff(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t angle;
@@ -2576,12 +2576,12 @@
//
//============================================================================
-void A_CentaurDefend(mobj_t * actor)
+void A_CentaurDefend(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_FaceTarget(actor);
+ A_FaceTarget(actor, player, psp);
if (P_CheckMeleeRange(actor) && P_Random() < 32)
{
- A_UnSetInvulnerable(actor);
+ A_UnSetInvulnerable(actor, player, psp);
P_SetMobjState(actor, actor->info->meleestate);
}
}
@@ -2592,7 +2592,7 @@
//
//============================================================================
-void A_BishopAttack(mobj_t * actor)
+void A_BishopAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
{
@@ -2614,7 +2614,7 @@
// Spawns one of a string of bishop missiles
//============================================================================
-void A_BishopAttack2(mobj_t * actor)
+void A_BishopAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -2639,7 +2639,7 @@
//
//============================================================================
-void A_BishopMissileWeave(mobj_t * actor)
+void A_BishopMissileWeave(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t newX, newY;
int weaveXY, weaveZ;
@@ -2668,7 +2668,7 @@
//
//============================================================================
-void A_BishopMissileSeek(mobj_t * actor)
+void A_BishopMissileSeek(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SeekerMissile(actor, ANG1 * 2, ANG1 * 3);
}
@@ -2679,7 +2679,7 @@
//
//============================================================================
-void A_BishopDecide(mobj_t * actor)
+void A_BishopDecide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_Random() < 220)
{
@@ -2697,7 +2697,7 @@
//
//============================================================================
-void A_BishopDoBlur(mobj_t * actor)
+void A_BishopDoBlur(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->special1.i = (P_Random() & 3) + 3; // Random number of blurs
if (P_Random() < 120)
@@ -2721,7 +2721,7 @@
//
//============================================================================
-void A_BishopSpawnBlur(mobj_t * actor)
+void A_BishopSpawnBlur(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -2751,7 +2751,7 @@
//
//============================================================================
-void A_BishopChase(mobj_t * actor)
+void A_BishopChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->z -= FloatBobOffsets[actor->special2.i] >> 1;
actor->special2.i = (actor->special2.i + 4) & 63;
@@ -2764,7 +2764,7 @@
//
//============================================================================
-void A_BishopPuff(mobj_t * actor)
+void A_BishopPuff(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -2782,7 +2782,7 @@
//
//============================================================================
-void A_BishopPainBlur(mobj_t * actor)
+void A_BishopPainBlur(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int r1,r2,r3;
@@ -2943,7 +2943,7 @@
//
//============================================================================
-void A_DragonInitFlight(mobj_t * actor)
+void A_DragonInitFlight(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int search;
@@ -2967,7 +2967,7 @@
//
//============================================================================
-void A_DragonFlight(mobj_t * actor)
+void A_DragonFlight(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
@@ -3005,9 +3005,9 @@
//
//============================================================================
-void A_DragonFlap(mobj_t * actor)
+void A_DragonFlap(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_DragonFlight(actor);
+ A_DragonFlight(actor, player, psp);
if (P_Random() < 240)
{
S_StartSound(actor, SFX_DRAGON_WINGFLAP);
@@ -3024,7 +3024,7 @@
//
//============================================================================
-void A_DragonAttack(mobj_t * actor)
+void A_DragonAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMissile(actor, actor->target, MT_DRAGON_FX);
}
@@ -3035,7 +3035,7 @@
//
//============================================================================
-void A_DragonFX2(mobj_t * actor)
+void A_DragonFX2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int i;
@@ -3066,9 +3066,9 @@
//
//============================================================================
-void A_DragonPain(mobj_t * actor)
+void A_DragonPain(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_Pain(actor);
+ A_Pain(actor, player, psp);
if (!actor->special1.i)
{ // no destination spot yet
P_SetMobjState(actor, S_DRAGON_INIT);
@@ -3081,7 +3081,7 @@
//
//============================================================================
-void A_DragonCheckCrash(mobj_t * actor)
+void A_DragonCheckCrash(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->z <= actor->floorz)
{
@@ -3096,7 +3096,7 @@
//
// A_DemonAttack1 (melee)
//
-void A_DemonAttack1(mobj_t * actor)
+void A_DemonAttack1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_CheckMeleeRange(actor))
{
@@ -3108,7 +3108,7 @@
//
// A_DemonAttack2 (missile)
//
-void A_DemonAttack2(mobj_t * actor)
+void A_DemonAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int fireBall;
@@ -3133,7 +3133,7 @@
// A_DemonDeath
//
-void A_DemonDeath(mobj_t * actor)
+void A_DemonDeath(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t angle;
@@ -3206,7 +3206,7 @@
//
//===========================================================================
-void A_Demon2Death(mobj_t * actor)
+void A_Demon2Death(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t angle;
@@ -3349,13 +3349,13 @@
// A_WraithInit
//
-void A_WraithInit(mobj_t * actor)
+void A_WraithInit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->z += 48 << FRACBITS;
actor->special1.i = 0; // index into floatbob
}
-void A_WraithRaiseInit(mobj_t * actor)
+void A_WraithRaiseInit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags2 &= ~MF2_DONTDRAW;
actor->flags2 &= ~MF2_NONSHOOTABLE;
@@ -3363,7 +3363,7 @@
actor->floorclip = actor->info->height;
}
-void A_WraithRaise(mobj_t * actor)
+void A_WraithRaise(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (A_RaiseMobj(actor))
{
@@ -3375,7 +3375,7 @@
}
-void A_WraithMelee(mobj_t * actor)
+void A_WraithMelee(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int amount;
@@ -3388,7 +3388,7 @@
}
}
-void A_WraithMissile(mobj_t * actor)
+void A_WraithMissile(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -3404,7 +3404,7 @@
// A_WraithFX2 - spawns sparkle tail of missile
//
-void A_WraithFX2(mobj_t * actor)
+void A_WraithFX2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t angle;
@@ -3436,7 +3436,7 @@
// Spawn an FX3 around the actor during attacks
-void A_WraithFX3(mobj_t * actor)
+void A_WraithFX3(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int numdropped = P_Random() % 15;
@@ -3456,7 +3456,7 @@
}
// Spawn an FX4 during movement
-void A_WraithFX4(mobj_t * actor)
+void A_WraithFX4(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int chance = P_Random();
@@ -3508,14 +3508,14 @@
}
-void A_WraithLook(mobj_t * actor)
+void A_WraithLook(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// A_WraithFX4(actor); // too expensive
- A_Look(actor);
+ A_Look(actor, player, psp);
}
-void A_WraithChase(mobj_t * actor)
+void A_WraithChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int weaveindex = actor->special1.i;
actor->z += FloatBobOffsets[weaveindex];
@@ -3525,8 +3525,8 @@
// P_SetMobjState(actor, S_WRAITH_RAISE2);
// return;
// }
- A_Chase(actor);
- A_WraithFX4(actor);
+ A_Chase(actor, player, psp);
+ A_WraithFX4(actor, player, psp);
}
@@ -3535,7 +3535,7 @@
// Ettin AI
//============================================================================
-void A_EttinAttack(mobj_t * actor)
+void A_EttinAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_CheckMeleeRange(actor))
{
@@ -3544,7 +3544,7 @@
}
-void A_DropMace(mobj_t * actor)
+void A_DropMace(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -3567,7 +3567,7 @@
// special2 whether strafing or not
//============================================================================
-void A_FiredSpawnRock(mobj_t * actor)
+void A_FiredSpawnRock(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int x, y, z;
@@ -3610,16 +3610,16 @@
actor->flags &= ~MF_JUSTATTACKED;
}
-void A_FiredRocks(mobj_t * actor)
+void A_FiredRocks(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_FiredSpawnRock(actor);
- A_FiredSpawnRock(actor);
- A_FiredSpawnRock(actor);
- A_FiredSpawnRock(actor);
- A_FiredSpawnRock(actor);
+ A_FiredSpawnRock(actor, player, psp);
+ A_FiredSpawnRock(actor, player, psp);
+ A_FiredSpawnRock(actor, player, psp);
+ A_FiredSpawnRock(actor, player, psp);
+ A_FiredSpawnRock(actor, player, psp);
}
-void A_FiredAttack(mobj_t * actor)
+void A_FiredAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
mo = P_SpawnMissile(actor, actor->target, MT_FIREDEMON_FX6);
@@ -3627,7 +3627,7 @@
S_StartSound(actor, SFX_FIRED_ATTACK);
}
-void A_SmBounce(mobj_t * actor)
+void A_SmBounce(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// give some more momentum (x,y,&z)
actor->z = actor->floorz + FRACUNIT;
@@ -3639,7 +3639,7 @@
#define FIREDEMON_ATTACK_RANGE 64*8*FRACUNIT
-void A_FiredChase(mobj_t * actor)
+void A_FiredChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int weaveindex = actor->special1.i;
mobj_t *target = actor->target;
@@ -3728,7 +3728,7 @@
}
}
-void A_FiredSplotch(mobj_t * actor)
+void A_FiredSplotch(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -3755,12 +3755,12 @@
//
//============================================================================
-void A_IceGuyLook(mobj_t * actor)
+void A_IceGuyLook(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t dist;
fixed_t an;
- A_Look(actor);
+ A_Look(actor, player, psp);
if (P_Random() < 64)
{
dist = ((P_Random() - 128) * actor->radius) >> 7;
@@ -3779,13 +3779,13 @@
//
//============================================================================
-void A_IceGuyChase(mobj_t * actor)
+void A_IceGuyChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t dist;
fixed_t an;
mobj_t *mo;
- A_Chase(actor);
+ A_Chase(actor, player, psp);
if (P_Random() < 128)
{
dist = ((P_Random() - 128) * actor->radius) >> 7;
@@ -3811,7 +3811,7 @@
//
//============================================================================
-void A_IceGuyAttack(mobj_t * actor)
+void A_IceGuyAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t an;
@@ -3840,7 +3840,7 @@
//
//============================================================================
-void A_IceGuyMissilePuff(mobj_t * actor)
+void A_IceGuyMissilePuff(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMobj(actor->x, actor->y, actor->z + 2 * FRACUNIT, MT_ICEFX_PUFF);
}
@@ -3851,13 +3851,13 @@
//
//============================================================================
-void A_IceGuyDie(mobj_t * actor)
+void A_IceGuyDie(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->momx = 0;
actor->momy = 0;
actor->momz = 0;
actor->height <<= 2;
- A_FreezeDeathChunks(actor);
+ A_FreezeDeathChunks(actor, player, psp);
}
//============================================================================
@@ -3866,7 +3866,7 @@
//
//============================================================================
-void A_IceGuyMissileExplode(mobj_t * actor)
+void A_IceGuyMissileExplode(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
unsigned int i;
@@ -3931,12 +3931,12 @@
// Spawn spinning balls above head - actor is sorcerer
-void A_SorcSpinBalls(mobj_t * actor)
+void A_SorcSpinBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
fixed_t z;
- A_SlowBalls(actor);
+ A_SlowBalls(actor, player, psp);
actor->args[0] = 0; // Currently no defense
actor->args[3] = SORC_NORMAL;
actor->args[4] = SORCBALL_INITIAL_SPEED; // Initial orbit speed
@@ -3962,7 +3962,7 @@
// A_SorcBallOrbit() ==========================================
//
-void A_SorcBallOrbit(mobj_t * actor)
+void A_SorcBallOrbit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int x, y;
angle_t angle, baseangle;
@@ -3996,15 +3996,15 @@
switch (mode)
{
case SORC_NORMAL: // Balls rotating normally
- A_SorcUpdateBallAngle(actor);
+ A_SorcUpdateBallAngle(actor, player, psp);
break;
case SORC_DECELERATE: // Balls decelerating
- A_DecelBalls(actor);
- A_SorcUpdateBallAngle(actor);
+ A_DecelBalls(actor, player, psp);
+ A_SorcUpdateBallAngle(actor, player, psp);
break;
case SORC_ACCELERATE: // Balls accelerating
- A_AccelBalls(actor);
- A_SorcUpdateBallAngle(actor);
+ A_AccelBalls(actor, player, psp);
+ A_SorcUpdateBallAngle(actor, player, psp);
break;
case SORC_STOPPING: // Balls stopping
if ((parent->special2.i == actor->type) &&
@@ -4036,7 +4036,7 @@
}
else
{
- A_SorcUpdateBallAngle(actor);
+ A_SorcUpdateBallAngle(actor, player, psp);
}
break;
case SORC_FIRESPELL: // Casting spell
@@ -4055,7 +4055,7 @@
}
else
{
- A_CastSorcererSpell(actor);
+ A_CastSorcererSpell(actor, player, psp);
parent->args[3] = SORC_STOPPED;
}
}
@@ -4074,7 +4074,7 @@
else
{
// Do rapid fire spell
- A_SorcOffense2(actor);
+ A_SorcOffense2(actor, player, psp);
}
}
break;
@@ -4101,7 +4101,7 @@
//
// Set balls to speed mode - actor is sorcerer
//
-void A_SpeedBalls(mobj_t * actor)
+void A_SpeedBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->args[3] = SORC_ACCELERATE; // speed mode
actor->args[2] = SORCBALL_TERMINAL_SPEED; // target speed
@@ -4111,7 +4111,7 @@
//
// Set balls to slow mode - actor is sorcerer
//
-void A_SlowBalls(mobj_t * actor)
+void A_SlowBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->args[3] = SORC_DECELERATE; // slow mode
actor->args[2] = SORCBALL_INITIAL_SPEED; // target speed
@@ -4122,7 +4122,7 @@
// Instant stop when rotation gets to ball in special2
// actor is sorcerer
//
-void A_StopBalls(mobj_t * actor)
+void A_StopBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int chance = P_Random();
actor->args[3] = SORC_STOPPING; // stopping mode
@@ -4149,7 +4149,7 @@
//
// Increase ball orbit speed - actor is ball
//
-void A_AccelBalls(mobj_t * actor)
+void A_AccelBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *sorc = actor->target;
@@ -4163,7 +4163,7 @@
if (sorc->args[4] >= SORCBALL_TERMINAL_SPEED)
{
// Reached terminal velocity - stop balls
- A_StopBalls(sorc);
+ A_StopBalls(sorc, player, psp);
}
}
}
@@ -4170,7 +4170,7 @@
// Decrease ball orbit speed - actor is ball
-void A_DecelBalls(mobj_t * actor)
+void A_DecelBalls(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *sorc = actor->target;
@@ -4186,7 +4186,7 @@
// Update angle if first ball - actor is ball
-void A_SorcUpdateBallAngle(mobj_t * actor)
+void A_SorcUpdateBallAngle(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->type == MT_SORCBALL1)
{
@@ -4196,7 +4196,7 @@
// actor is ball
-void A_CastSorcererSpell(mobj_t * actor)
+void A_CastSorcererSpell(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int spell = actor->type;
@@ -4213,7 +4213,7 @@
switch (spell)
{
case MT_SORCBALL1: // Offensive
- A_SorcOffense1(actor);
+ A_SorcOffense1(actor, player, psp);
break;
case MT_SORCBALL2: // Defensive
z = parent->z - parent->floorclip +
@@ -4267,7 +4267,7 @@
*/
// actor is ball
-void A_SorcOffense1(mobj_t * actor)
+void A_SorcOffense1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
angle_t ang1, ang2;
@@ -4295,7 +4295,7 @@
// Actor is ball
-void A_SorcOffense2(mobj_t * actor)
+void A_SorcOffense2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t ang1;
mobj_t *mo;
@@ -4323,7 +4323,7 @@
// Resume ball spinning
-void A_SorcBossAttack(mobj_t * actor)
+void A_SorcBossAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->args[3] = SORC_ACCELERATE;
actor->args[2] = SORCBALL_INITIAL_SPEED;
@@ -4331,7 +4331,7 @@
// spell cast magic fizzle
-void A_SpawnFizzle(mobj_t * actor)
+void A_SpawnFizzle(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t x, y, z;
fixed_t dist = 5 * FRACUNIT;
@@ -4362,9 +4362,9 @@
// Yellow spell - offense
//============================================================================
-void A_SorcFX1Seek(mobj_t * actor)
+void A_SorcFX1Seek(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_BounceCheck(actor);
+ A_BounceCheck(actor, player, psp);
P_SeekerMissile(actor, ANG1 * 2, ANG1 * 6);
}
@@ -4381,7 +4381,7 @@
//============================================================================
// Split ball in two
-void A_SorcFX2Split(mobj_t * actor)
+void A_SorcFX2Split(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -4406,7 +4406,7 @@
// Orbit FX2 about sorcerer
-void A_SorcFX2Orbit(mobj_t * actor)
+void A_SorcFX2Orbit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
fixed_t x, y, z;
@@ -4464,7 +4464,7 @@
// Green spell - spawn bishops
//============================================================================
-void A_SpawnBishop(mobj_t * actor)
+void A_SpawnBishop(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
mo = P_SpawnMobj(actor->x, actor->y, actor->z, MT_BISHOP);
@@ -4485,12 +4485,12 @@
}
*/
-void A_SmokePuffExit(mobj_t * actor)
+void A_SmokePuffExit(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMobj(actor->x, actor->y, actor->z, MT_MNTRSMOKEEXIT);
}
-void A_SorcererBishopEntry(mobj_t * actor)
+void A_SorcererBishopEntry(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMobj(actor->x, actor->y, actor->z, MT_SORCFX3_EXPLOSION);
S_StartSound(actor, actor->info->seesound);
@@ -4501,7 +4501,7 @@
// FX4 - rapid fire balls
//============================================================================
-void A_SorcFX4Check(mobj_t * actor)
+void A_SorcFX4Check(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->special2.i-- <= 0)
{
@@ -4513,7 +4513,7 @@
// Ball death - spawn stuff
//============================================================================
-void A_SorcBallPop(mobj_t * actor)
+void A_SorcBallPop(mobj_t *actor, player_t *player, pspdef_t *psp)
{
S_StartSound(NULL, SFX_SORCERER_BALLPOP);
actor->flags &= ~MF_NOGRAVITY;
@@ -4528,7 +4528,7 @@
-void A_BounceCheck(mobj_t * actor)
+void A_BounceCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->args[4]-- <= 0)
{
@@ -4564,7 +4564,7 @@
//============================================================================
#define CLASS_BOSS_STRAFE_RANGE 64*10*FRACUNIT
-void A_FastChase(mobj_t * actor)
+void A_FastChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int delta;
fixed_t dist;
@@ -4695,31 +4695,31 @@
}
-void A_FighterAttack(mobj_t * actor)
+void A_FighterAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
return;
- A_FSwordAttack2(actor);
+ A_FSwordAttack2(actor, player, psp);
}
-void A_ClericAttack(mobj_t * actor)
+void A_ClericAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
return;
- A_CHolyAttack3(actor);
+ A_CHolyAttack3(actor, player, psp);
}
-void A_MageAttack(mobj_t * actor)
+void A_MageAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!actor->target)
return;
- A_MStaffAttack2(actor);
+ A_MStaffAttack2(actor, player, psp);
}
-void A_ClassBossHealth(mobj_t * actor)
+void A_ClassBossHealth(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (netgame && !deathmatch) // co-op only
{
@@ -4738,7 +4738,7 @@
//
//===========================================================================
-void A_CheckFloor(mobj_t * actor)
+void A_CheckFloor(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->z <= actor->floorz)
{
@@ -4754,7 +4754,7 @@
//
//============================================================================
-void A_FreezeDeath(mobj_t * actor)
+void A_FreezeDeath(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int r = P_Random();
actor->tics = 75 + r + P_Random();
@@ -4786,7 +4786,7 @@
//
//============================================================================
-void A_IceSetTics(mobj_t * actor)
+void A_IceSetTics(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int floor;
@@ -4808,7 +4808,7 @@
//
//============================================================================
-void A_IceCheckHeadDone(mobj_t * actor)
+void A_IceCheckHeadDone(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->special2.i == 666)
{
@@ -4822,7 +4822,7 @@
//
//============================================================================
-void A_FreezeDeathChunks(mobj_t * actor)
+void A_FreezeDeathChunks(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int i;
int r1,r2,r3;
@@ -4850,7 +4850,7 @@
mo->momz = FixedDiv(mo->z - actor->z, actor->height) << 2;
mo->momx = P_SubRandom() << (FRACBITS - 7);
mo->momy = P_SubRandom() << (FRACBITS - 7);
- A_IceSetTics(mo); // set a random tic wait
+ A_IceSetTics(mo, NULL, NULL); // set a random tic wait
}
for (i = 12 + (P_Random() & 15); i >= 0; i--)
{
@@ -4867,7 +4867,7 @@
mo->momz = FixedDiv(mo->z - actor->z, actor->height) << 2;
mo->momx = P_SubRandom() << (FRACBITS - 7);
mo->momy = P_SubRandom() << (FRACBITS - 7);
- A_IceSetTics(mo); // set a random tic wait
+ A_IceSetTics(mo, NULL, NULL); // set a random tic wait
}
if (actor->player)
{ // attach the player's view to a chunk of ice
@@ -4924,7 +4924,7 @@
#define KORAX_FIRST_TELEPORT_TID (248)
#define KORAX_TELEPORT_TID (249)
-void A_KoraxChase(mobj_t * actor)
+void A_KoraxChase(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *spot;
int lastfound;
@@ -4974,18 +4974,18 @@
}
}
-void A_KoraxStep(mobj_t * actor)
+void A_KoraxStep(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_Chase(actor);
+ A_Chase(actor, player, psp);
}
-void A_KoraxStep2(mobj_t * actor)
+void A_KoraxStep2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
S_StartSound(NULL, SFX_KORAX_STEP);
- A_Chase(actor);
+ A_Chase(actor, player, psp);
}
-void A_KoraxBonePop(mobj_t * actor)
+void A_KoraxBonePop(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
byte args[5];
@@ -5047,7 +5047,7 @@
tail->special1.m = NULL; // last tail bit
}
-void A_KoraxDecide(mobj_t * actor)
+void A_KoraxDecide(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (P_Random() < 220)
{
@@ -5059,7 +5059,7 @@
}
}
-void A_KoraxMissile(mobj_t * actor)
+void A_KoraxMissile(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int type = P_Random() % 6;
int sound = 0;
@@ -5106,7 +5106,7 @@
// Call action code scripts (250-254)
-void A_KoraxCommand(mobj_t * actor)
+void A_KoraxCommand(mobj_t *actor, player_t *player, pspdef_t *psp)
{
byte args[5];
fixed_t x, y, z;
@@ -5261,7 +5261,7 @@
}
-void A_KSpiritWeave(mobj_t * actor)
+void A_KSpiritWeave(mobj_t *actor)
{
fixed_t newX, newY;
int weaveXY, weaveZ;
@@ -5349,7 +5349,7 @@
}
-void A_KSpiritRoam(mobj_t * actor)
+void A_KSpiritRoam(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (actor->health-- <= 0)
{
@@ -5371,7 +5371,7 @@
}
}
-void A_KBolt(mobj_t * actor)
+void A_KBolt(mobj_t *actor, player_t *player, pspdef_t *psp)
{
// Countdown lifetime
if (actor->special1.i-- <= 0)
@@ -5384,7 +5384,7 @@
#define KORAX_BOLT_HEIGHT 48*FRACUNIT
#define KORAX_BOLT_LIFETIME 3
-void A_KBoltRaise(mobj_t * actor)
+void A_KBoltRaise(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
fixed_t z;
--- a/src/hexen/p_inter.c
+++ b/src/hexen/p_inter.c
@@ -892,7 +892,7 @@
//
//---------------------------------------------------------------------------
-void A_RestoreArtifact(mobj_t * arti)
+void A_RestoreArtifact(mobj_t *arti, player_t *player, pspdef_t *psp)
{
arti->flags |= MF_SPECIAL;
P_SetMobjState(arti, arti->info->spawnstate);
@@ -907,7 +907,7 @@
//
//---------------------------------------------------------------------------
-void A_RestoreSpecialThing1(mobj_t * thing)
+void A_RestoreSpecialThing1(mobj_t * thing, player_t *player, pspdef_t *psp)
{
thing->flags2 &= ~MF2_DONTDRAW;
S_StartSound(thing, SFX_RESPAWN);
@@ -919,7 +919,7 @@
//
//---------------------------------------------------------------------------
-void A_RestoreSpecialThing2(mobj_t * thing)
+void A_RestoreSpecialThing2(mobj_t * thing, player_t *player, pspdef_t *psp)
{
thing->flags |= MF_SPECIAL;
P_SetMobjState(thing, thing->info->spawnstate);
--- a/src/hexen/p_local.h
+++ b/src/hexen/p_local.h
@@ -186,31 +186,31 @@
int P_Massacre(void);
boolean A_RaiseMobj(mobj_t * actor);
boolean A_SinkMobj(mobj_t * actor);
-void A_NoBlocking(mobj_t * actor);
+void A_NoBlocking(mobj_t *actor, player_t *player, pspdef_t *psp);
boolean P_LookForMonsters(mobj_t * actor);
void P_InitCreatureCorpseQueue(boolean corpseScan);
void A_DeQueueCorpse(mobj_t * actor);
-void A_Explode(mobj_t *actor);
-void A_CHolyAttack3(mobj_t *actor);
-void A_FSwordAttack2(mobj_t *actor);
-void A_MStaffAttack2(mobj_t *actor);
-void A_FreezeDeathChunks(mobj_t *actor);
-void A_SorcBallOrbit(mobj_t *actor);
-void A_SorcSpinBalls(mobj_t *actor);
-void A_SpeedBalls(mobj_t *actor);
-void A_SlowBalls(mobj_t *actor);
-void A_StopBalls(mobj_t *actor);
-void A_AccelBalls(mobj_t *actor);
-void A_DecelBalls(mobj_t *actor);
-void A_SorcBossAttack(mobj_t *actor);
-void A_SpawnFizzle(mobj_t *actor);
-void A_CastSorcererSpell(mobj_t *actor);
-void A_SorcUpdateBallAngle(mobj_t *actor);
-void A_BounceCheck(mobj_t *actor);
-void A_SorcFX1Seek(mobj_t *actor);
-void A_SorcOffense1(mobj_t *actor);
-void A_SorcOffense2(mobj_t *actor);
-void A_MinotaurLook(mobj_t *actor);
+void A_Explode(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CHolyAttack3(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FSwordAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MStaffAttack2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_FreezeDeathChunks(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcBallOrbit(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcSpinBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SpeedBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SlowBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_StopBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_AccelBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_DecelBalls(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcBossAttack(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SpawnFizzle(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_CastSorcererSpell(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcUpdateBallAngle(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_BounceCheck(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcFX1Seek(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcOffense1(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_SorcOffense2(mobj_t *actor, player_t *player, pspdef_t *psp);
+void A_MinotaurLook(mobj_t *actor, player_t *player, pspdef_t *psp);
// ***** P_MAPUTL *****
@@ -349,7 +349,7 @@
boolean A_LocalQuake(byte * args, mobj_t * victim);
void P_SpawnDirt(mobj_t * actor, fixed_t radius);
void A_BridgeRemove(mobj_t * actor);
-void A_UnHideThing(mobj_t *actor);
+void A_UnHideThing(mobj_t *actor, player_t *player, pspdef_t *psp);
// ***** SB_BAR *****
--- a/src/hexen/p_mobj.c
+++ b/src/hexen/p_mobj.c
@@ -102,7 +102,7 @@
mobj->frame = st->frame;
if (st->action)
{ // Call action function
- st->action(mobj);
+ st->action(mobj, NULL, NULL);
}
return (true);
}
--- a/src/hexen/p_pspr.c
+++ b/src/hexen/p_pspr.c
@@ -242,7 +242,7 @@
}
if (state->action)
{ // Call action routine.
- state->action(player, psp);
+ state->action(NULL, player, psp);
if (!psp->state)
{
break;
@@ -488,7 +488,7 @@
//
//---------------------------------------------------------------------------
-void A_WeaponReady(player_t * player, pspdef_t * psp)
+void A_WeaponReady(mobj_t *obj, player_t *player, pspdef_t *psp)
{
int angle;
@@ -538,7 +538,7 @@
//
//---------------------------------------------------------------------------
-void A_ReFire(player_t * player, pspdef_t * psp)
+void A_ReFire(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
if ((player->cmd.buttons & BT_ATTACK)
&& player->pendingweapon == WP_NOCHANGE && player->health)
@@ -559,7 +559,7 @@
//
//---------------------------------------------------------------------------
-void A_Lower(player_t * player, pspdef_t * psp)
+void A_Lower(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
if (player->morphTics)
{
@@ -593,7 +593,7 @@
//
//---------------------------------------------------------------------------
-void A_Raise(player_t * player, pspdef_t * psp)
+void A_Raise(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
psp->sy -= RAISESPEED;
if (psp->sy > WEAPONTOP)
@@ -688,7 +688,7 @@
//
//============================================================================
-void A_SnoutAttack(player_t * player, pspdef_t * psp)
+void A_SnoutAttack(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
angle_t angle;
int damage;
@@ -721,7 +721,7 @@
#define HAMMER_RANGE (MELEERANGE+MELEERANGE/2)
-void A_FHammerAttack(player_t * player, pspdef_t * psp)
+void A_FHammerAttack(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
angle_t angle;
mobj_t *pmo = player->mo;
@@ -790,7 +790,7 @@
//
//============================================================================
-void A_FHammerThrow(player_t * player, pspdef_t * psp)
+void A_FHammerThrow(mobj_t *mobj, player_t * player, pspdef_t * psp)
{
mobj_t *mo;
@@ -812,7 +812,7 @@
//
//============================================================================
-void A_FSwordAttack(player_t * player, pspdef_t * psp)
+void A_FSwordAttack(mobj_t *mobj, player_t *player, pspdef_t *psp)
{
mobj_t *pmo;
@@ -837,7 +837,7 @@
//
//============================================================================
-void A_FSwordAttack2(mobj_t * actor)
+void A_FSwordAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle = actor->angle;
@@ -855,7 +855,7 @@
//
//============================================================================
-void A_FSwordFlames(mobj_t * actor)
+void A_FSwordFlames(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int i;
int r1,r2,r3;
@@ -877,7 +877,7 @@
//
//============================================================================
-void A_MWandAttack(player_t * player, pspdef_t * psp)
+void A_MWandAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -897,9 +897,9 @@
//
//============================================================================
-void A_LightningReady(player_t * player, pspdef_t * psp)
+void A_LightningReady(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_WeaponReady(player, psp);
+ A_WeaponReady(actor, player, psp);
if (P_Random() < 160)
{
S_StartSound(player->mo, SFX_MAGE_LIGHTNING_READY);
@@ -914,7 +914,7 @@
#define ZAGSPEED FRACUNIT
-void A_LightningClip(mobj_t * actor)
+void A_LightningClip(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *cMo;
mobj_t *target = NULL;
@@ -976,13 +976,13 @@
//
//============================================================================
-void A_LightningZap(mobj_t * actor)
+void A_LightningZap(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
fixed_t deltaZ;
int r1,r2;
- A_LightningClip(actor);
+ A_LightningClip(actor, player, psp);
actor->health -= 8;
if (actor->health <= 0)
@@ -1050,7 +1050,7 @@
//
//============================================================================
-void A_MLightningAttack2(mobj_t * actor)
+void A_MLightningAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *fmo, *cmo;
@@ -1060,13 +1060,13 @@
{
fmo->special1.m = NULL;
fmo->special2.m = cmo;
- A_LightningZap(fmo);
+ A_LightningZap(fmo, player, psp);
}
if (cmo)
{
cmo->special1.m = NULL; // mobj that it will track
cmo->special2.m = fmo;
- A_LightningZap(cmo);
+ A_LightningZap(cmo, player, psp);
}
S_StartSound(actor, SFX_MAGE_LIGHTNING_FIRE);
}
@@ -1077,9 +1077,9 @@
//
//============================================================================
-void A_MLightningAttack(player_t * player, pspdef_t * psp)
+void A_MLightningAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_MLightningAttack2(player->mo);
+ A_MLightningAttack2(player->mo, player, psp);
player->mana[MANA_2] -= WeaponManaUse[player->class][player->readyweapon];
}
@@ -1089,7 +1089,7 @@
//
//============================================================================
-void A_ZapMimic(mobj_t * actor)
+void A_ZapMimic(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -1115,7 +1115,7 @@
//
//============================================================================
-void A_LastZap(mobj_t * actor)
+void A_LastZap(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -1133,7 +1133,7 @@
//
//============================================================================
-void A_LightningRemove(mobj_t * actor)
+void A_LightningRemove(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -1169,7 +1169,7 @@
//
//============================================================================
-void A_MStaffAttack(player_t * player, pspdef_t * psp)
+void A_MStaffAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
mobj_t *pmo;
@@ -1199,7 +1199,7 @@
//
//============================================================================
-void A_MStaffPalette(player_t * player, pspdef_t * psp)
+void A_MStaffPalette(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int pal;
@@ -1221,7 +1221,7 @@
//
//============================================================================
-void A_MStaffWeave(mobj_t * actor)
+void A_MStaffWeave(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t newX, newY;
int weaveXY, weaveZ;
@@ -1255,7 +1255,7 @@
//
//============================================================================
-void A_MStaffTrack(mobj_t * actor)
+void A_MStaffTrack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if ((actor->special1.m == NULL) && (P_Random() < 50))
{
@@ -1289,7 +1289,7 @@
//
//============================================================================
-void A_MStaffAttack2(mobj_t * actor)
+void A_MStaffAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
angle = actor->angle;
@@ -1305,7 +1305,7 @@
//
//============================================================================
-void A_FPunchAttack(player_t * player, pspdef_t * psp)
+void A_FPunchAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
int damage;
@@ -1383,7 +1383,7 @@
#define AXERANGE 2.25*MELEERANGE
-void A_FAxeAttack(player_t * player, pspdef_t * psp)
+void A_FAxeAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
mobj_t *pmo = player->mo;
@@ -1464,7 +1464,7 @@
//
//===========================================================================
-void A_CMaceAttack(player_t * player, pspdef_t * psp)
+void A_CMaceAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
int damage;
@@ -1512,7 +1512,7 @@
//
//============================================================================
-void A_CStaffCheck(player_t * player, pspdef_t * psp)
+void A_CStaffCheck(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *pmo;
int damage;
@@ -1572,7 +1572,7 @@
//
//============================================================================
-void A_CStaffAttack(player_t * player, pspdef_t * psp)
+void A_CStaffAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
mobj_t *pmo;
@@ -1598,7 +1598,7 @@
//
//============================================================================
-void A_CStaffMissileSlither(mobj_t * actor)
+void A_CStaffMissileSlither(mobj_t *actor, player_t *player, pspdef_t *psp)
{
fixed_t newX, newY;
int weaveXY;
@@ -1621,7 +1621,7 @@
//
//============================================================================
-void A_CStaffInitBlink(player_t * player, pspdef_t * psp)
+void A_CStaffInitBlink(mobj_t *actor, player_t *player, pspdef_t *psp)
{
player->mo->special1.i = (P_Random() >> 1) + 20;
}
@@ -1632,7 +1632,7 @@
//
//============================================================================
-void A_CStaffCheckBlink(player_t * player, pspdef_t * psp)
+void A_CStaffCheckBlink(mobj_t *actor, player_t *player, pspdef_t *psp)
{
if (!--player->mo->special1.i)
{
@@ -1650,7 +1650,7 @@
#define FLAMESPEED (0.45*FRACUNIT)
#define CFLAMERANGE (12*64*FRACUNIT)
-void A_CFlameAttack(player_t * player, pspdef_t * psp)
+void A_CFlameAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
@@ -1671,9 +1671,9 @@
//
//============================================================================
-void A_CFlamePuff(mobj_t * actor)
+void A_CFlamePuff(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_UnHideThing(actor);
+ A_UnHideThing(actor, player, psp);
actor->momx = 0;
actor->momy = 0;
actor->momz = 0;
@@ -1686,7 +1686,7 @@
//
//============================================================================
-void A_CFlameMissile(mobj_t * actor)
+void A_CFlameMissile(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int i;
int an;
@@ -1693,7 +1693,7 @@
fixed_t dist;
mobj_t *mo;
- A_UnHideThing(actor);
+ A_UnHideThing(actor, player, psp);
S_StartSound(actor, SFX_CLERIC_FLAME_EXPLODE);
if (BlockingMobj && BlockingMobj->flags & MF_SHOOTABLE)
{ // Hit something, so spawn the flame circle around the thing
@@ -1821,7 +1821,7 @@
#define FLAMEROTSPEED 2*FRACUNIT
-void A_CFlameRotate(mobj_t * actor)
+void A_CFlameRotate(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int an;
@@ -1839,7 +1839,7 @@
// Spawns the spirits
//============================================================================
-void A_CHolyAttack3(mobj_t * actor)
+void A_CHolyAttack3(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMissile(actor, actor->target, MT_HOLY_MISSILE);
S_StartSound(actor, SFX_CHOLY_FIRE);
@@ -1853,7 +1853,7 @@
// Spawns the spirits
//============================================================================
-void A_CHolyAttack2(mobj_t * actor)
+void A_CHolyAttack2(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int j;
int i;
@@ -1920,7 +1920,7 @@
//
//============================================================================
-void A_CHolyAttack(player_t * player, pspdef_t * psp)
+void A_CHolyAttack(mobj_t *actor, player_t *player, pspdef_t *psp)
{
player->mana[MANA_1] -= WeaponManaUse[player->class][player->readyweapon];
player->mana[MANA_2] -= WeaponManaUse[player->class][player->readyweapon];
@@ -1941,7 +1941,7 @@
//
//============================================================================
-void A_CHolyPalette(player_t * player, pspdef_t * psp)
+void A_CHolyPalette(mobj_t *actor, player_t *player, pspdef_t *psp)
{
int pal;
@@ -2091,7 +2091,7 @@
//
//============================================================================
-void A_CHolySeek(mobj_t * actor)
+void A_CHolySeek(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->health--;
if (actor->health <= 0)
@@ -2186,7 +2186,7 @@
//
//============================================================================
-void A_CHolyTail(mobj_t * actor)
+void A_CHolyTail(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *parent;
@@ -2220,9 +2220,9 @@
//
//============================================================================
-void A_CHolyCheckScream(mobj_t * actor)
+void A_CHolyCheckScream(mobj_t *actor, player_t *player, pspdef_t *psp)
{
- A_CHolySeek(actor);
+ A_CHolySeek(actor, player, psp);
if (P_Random() < 20)
{
S_StartSound(actor, SFX_SPIRIT_ACTIVE);
@@ -2239,7 +2239,7 @@
//
//============================================================================
-void A_CHolySpawnPuff(mobj_t * actor)
+void A_CHolySpawnPuff(mobj_t *actor, player_t *player, pspdef_t *psp)
{
P_SpawnMobj(actor->x, actor->y, actor->z, MT_HOLY_MISSILE_PUFF);
}
@@ -2255,7 +2255,7 @@
#define SHARDSPAWN_UP 4
#define SHARDSPAWN_DOWN 8
-void A_FireConePL1(player_t * player, pspdef_t * psp)
+void A_FireConePL1(mobj_t *actor, player_t *player, pspdef_t *psp)
{
angle_t angle;
int damage;
@@ -2297,7 +2297,7 @@
}
}
-void A_ShedShard(mobj_t * actor)
+void A_ShedShard(mobj_t *actor, player_t *player, pspdef_t *psp)
{
mobj_t *mo;
int spawndir = actor->special1.i;
@@ -2401,7 +2401,7 @@
}
*/
-void A_Light0(player_t * player, pspdef_t * psp)
+void A_Light0(mobj_t *actor, player_t *player, pspdef_t *psp)
{
player->extralight = 0;
}
--- a/src/hexen/p_user.c
+++ b/src/hexen/p_user.c
@@ -1635,7 +1635,7 @@
//
//============================================================================
-void A_SpeedFade(mobj_t * actor)
+void A_SpeedFade(mobj_t *actor, player_t *player, pspdef_t *psp)
{
actor->flags |= MF_SHADOW;
actor->flags &= ~MF_ALTSHADOW;