From 371712c53a92cdce5bc2ac0e7b41306d884a4836 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 22 Oct 2016 17:49:08 +0200 Subject: [PATCH] - turned everything I could into non-action functions. - fixed emission of the self pointer in FxVMFunctionCall. I did not realize that the self expression only sets up a register for the value, not pushing it onto the stack. --- src/g_doom/a_arachnotron.cpp | 4 +- src/g_doom/a_archvile.cpp | 12 +- src/g_doom/a_bossbrain.cpp | 16 +- src/g_doom/a_bruiser.cpp | 2 +- src/g_doom/a_cacodemon.cpp | 2 +- src/g_doom/a_cyberdemon.cpp | 4 +- src/g_doom/a_demon.cpp | 2 +- src/g_doom/a_doomimp.cpp | 2 +- src/g_doom/a_doommisc.cpp | 2 +- src/g_doom/a_doomweaps.cpp | 38 +- src/g_doom/a_fatso.cpp | 10 +- src/g_doom/a_keen.cpp | 2 +- src/g_doom/a_lostsoul.cpp | 4 +- src/g_doom/a_painelemental.cpp | 6 +- src/g_doom/a_possessed.cpp | 10 +- src/g_doom/a_revenant.cpp | 8 +- src/g_doom/a_scriptedmarine.cpp | 34 +- src/g_doom/a_spidermaster.cpp | 4 +- src/g_heretic/a_chicken.cpp | 10 +- src/g_heretic/a_dsparil.cpp | 20 +- src/g_heretic/a_hereticartifacts.cpp | 2 +- src/g_heretic/a_hereticimp.cpp | 8 +- src/g_heretic/a_hereticmisc.cpp | 14 +- src/g_heretic/a_hereticweaps.cpp | 54 +-- src/g_heretic/a_ironlich.cpp | 8 +- src/g_heretic/a_knight.cpp | 4 +- src/g_heretic/a_wizard.cpp | 8 +- src/g_hexen/a_bats.cpp | 6 +- src/g_hexen/a_bishop.cpp | 18 +- src/g_hexen/a_blastradius.cpp | 2 +- src/g_hexen/a_centaur.cpp | 2 +- src/g_hexen/a_clericflame.cpp | 8 +- src/g_hexen/a_clericholy.cpp | 14 +- src/g_hexen/a_clericmace.cpp | 2 +- src/g_hexen/a_clericstaff.cpp | 10 +- src/g_hexen/a_dragon.cpp | 14 +- src/g_hexen/a_fighteraxe.cpp | 12 +- src/g_hexen/a_fighterhammer.cpp | 4 +- src/g_hexen/a_fighterplayer.cpp | 2 +- src/g_hexen/a_fighterquietus.cpp | 6 +- src/g_hexen/a_firedemon.cpp | 10 +- src/g_hexen/a_flechette.cpp | 10 +- src/g_hexen/a_flies.cpp | 4 +- src/g_hexen/a_fog.cpp | 4 +- src/g_hexen/a_heresiarch.cpp | 26 +- src/g_hexen/a_hexenspecialdecs.cpp | 24 +- src/g_hexen/a_iceguy.cpp | 10 +- src/g_hexen/a_korax.cpp | 16 +- src/g_hexen/a_magecone.cpp | 4 +- src/g_hexen/a_magelightning.cpp | 14 +- src/g_hexen/a_magestaff.cpp | 8 +- src/g_hexen/a_pig.cpp | 4 +- src/g_hexen/a_serpent.cpp | 26 +- src/g_hexen/a_spike.cpp | 10 +- src/g_hexen/a_summon.cpp | 2 +- src/g_hexen/a_teleportother.cpp | 10 +- src/g_hexen/a_wraith.cpp | 14 +- src/g_raven/a_minotaur.cpp | 20 +- src/g_shared/a_action.cpp | 46 +-- src/g_shared/a_bridge.cpp | 4 +- src/g_shared/a_pickups.cpp | 8 +- src/g_shared/a_specialspot.cpp | 2 +- src/g_shared/a_weapons.cpp | 4 +- src/g_strife/a_acolyte.cpp | 8 +- src/g_strife/a_alienspectres.cpp | 8 +- src/g_strife/a_crusader.cpp | 10 +- src/g_strife/a_entityboss.cpp | 8 +- src/g_strife/a_inquisitor.cpp | 12 +- src/g_strife/a_loremaster.cpp | 2 +- src/g_strife/a_oracle.cpp | 2 +- src/g_strife/a_programmer.cpp | 8 +- src/g_strife/a_reaver.cpp | 2 +- src/g_strife/a_rebels.cpp | 4 +- src/g_strife/a_sentinel.cpp | 6 +- src/g_strife/a_spectral.cpp | 8 +- src/g_strife/a_stalker.cpp | 10 +- src/g_strife/a_strifeitems.cpp | 2 +- src/g_strife/a_strifestuff.cpp | 30 +- src/g_strife/a_strifeweapons.cpp | 56 +-- src/g_strife/a_templar.cpp | 2 +- src/g_strife/a_thingstoblowup.cpp | 8 +- src/info.h | 4 +- src/p_actionfunctions.cpp | 116 +++--- src/p_enemy.cpp | 44 +-- src/p_pspr.cpp | 38 +- src/p_user.cpp | 6 +- src/scripting/codegeneration/codegen.cpp | 53 +-- wadsrc/static/zscript/actor.txt | 342 +++++++++--------- wadsrc/static/zscript/doom/scriptedmarine.txt | 32 +- wadsrc/static/zscript/heretic/chicken.txt | 6 +- wadsrc/static/zscript/heretic/dsparil.txt | 20 +- .../zscript/heretic/hereticartifacts.txt | 2 +- wadsrc/static/zscript/heretic/hereticimp.txt | 8 +- wadsrc/static/zscript/heretic/hereticmisc.txt | 14 +- .../static/zscript/heretic/hereticweaps.txt | 54 +-- wadsrc/static/zscript/heretic/ironlich.txt | 8 +- wadsrc/static/zscript/heretic/knight.txt | 4 +- wadsrc/static/zscript/heretic/wizard.txt | 8 +- wadsrc/static/zscript/hexen/bats.txt | 6 +- wadsrc/static/zscript/hexen/bishop.txt | 14 +- wadsrc/static/zscript/hexen/clericboss.txt | 2 +- wadsrc/static/zscript/hexen/clericflame.txt | 8 +- wadsrc/static/zscript/hexen/clericholy.txt | 12 +- wadsrc/static/zscript/hexen/clericmace.txt | 2 +- wadsrc/static/zscript/hexen/clericstaff.txt | 8 +- wadsrc/static/zscript/hexen/dragon.txt | 14 +- wadsrc/static/zscript/hexen/fighteraxe.txt | 12 +- wadsrc/static/zscript/hexen/fighterboss.txt | 2 +- wadsrc/static/zscript/hexen/fighterfist.txt | 2 +- wadsrc/static/zscript/hexen/fighterhammer.txt | 4 +- .../static/zscript/hexen/fighterquietus.txt | 4 +- wadsrc/static/zscript/hexen/firedemon.txt | 10 +- wadsrc/static/zscript/hexen/flechette.txt | 14 +- wadsrc/static/zscript/hexen/flies.txt | 4 +- wadsrc/static/zscript/hexen/fog.txt | 4 +- wadsrc/static/zscript/hexen/heresiarch.txt | 26 +- .../static/zscript/hexen/hexenspecialdecs.txt | 22 +- wadsrc/static/zscript/hexen/iceguy.txt | 8 +- wadsrc/static/zscript/hexen/korax.txt | 16 +- wadsrc/static/zscript/hexen/mageboss.txt | 2 +- wadsrc/static/zscript/hexen/magecone.txt | 4 +- wadsrc/static/zscript/hexen/magelightning.txt | 14 +- wadsrc/static/zscript/hexen/magestaff.txt | 6 +- wadsrc/static/zscript/hexen/pig.txt | 2 +- wadsrc/static/zscript/hexen/serpent.txt | 26 +- wadsrc/static/zscript/hexen/spike.txt | 10 +- wadsrc/static/zscript/hexen/summon.txt | 2 +- wadsrc/static/zscript/hexen/teleportother.txt | 10 +- wadsrc/static/zscript/hexen/wraith.txt | 14 +- wadsrc/static/zscript/raven/minotaur.txt | 20 +- wadsrc/static/zscript/shared/bridge.txt | 4 +- wadsrc/static/zscript/shared/ice.txt | 2 +- wadsrc/static/zscript/shared/inventory.txt | 50 +-- wadsrc/static/zscript/shared/specialspot.txt | 2 +- wadsrc/static/zscript/strife/acolyte.txt | 8 +- .../static/zscript/strife/alienspectres.txt | 2 +- wadsrc/static/zscript/strife/crusader.txt | 10 +- wadsrc/static/zscript/strife/entityboss.txt | 8 +- wadsrc/static/zscript/strife/inquisitor.txt | 14 +- wadsrc/static/zscript/strife/loremaster.txt | 2 +- wadsrc/static/zscript/strife/oracle.txt | 2 +- wadsrc/static/zscript/strife/programmer.txt | 8 +- wadsrc/static/zscript/strife/reaver.txt | 2 +- wadsrc/static/zscript/strife/rebels.txt | 2 +- wadsrc/static/zscript/strife/sentinel.txt | 2 +- wadsrc/static/zscript/strife/sigil.txt | 20 +- wadsrc/static/zscript/strife/spectral.txt | 14 +- wadsrc/static/zscript/strife/stalker.txt | 10 +- wadsrc/static/zscript/strife/strifeplayer.txt | 6 +- .../static/zscript/strife/strifeweapons.txt | 28 +- wadsrc/static/zscript/strife/templar.txt | 2 +- .../static/zscript/strife/thingstoblowup.txt | 6 +- 152 files changed, 1051 insertions(+), 1072 deletions(-) diff --git a/src/g_doom/a_arachnotron.cpp b/src/g_doom/a_arachnotron.cpp index e558b05b2..22223d24b 100644 --- a/src/g_doom/a_arachnotron.cpp +++ b/src/g_doom/a_arachnotron.cpp @@ -9,7 +9,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BspiAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -23,7 +23,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BspiAttack) DEFINE_ACTION_FUNCTION(AActor, A_BabyMetal) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "baby/walk", 1, ATTN_IDLE); A_Chase (stack, self); return 0; diff --git a/src/g_doom/a_archvile.cpp b/src/g_doom/a_archvile.cpp index 06be5cc0c..b63564654 100644 --- a/src/g_doom/a_archvile.cpp +++ b/src/g_doom/a_archvile.cpp @@ -21,7 +21,7 @@ void A_Fire(AActor *self, double height); // DEFINE_ACTION_FUNCTION(AActor, A_VileStart) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_VOICE, "vile/start", 1, ATTN_NORM); return 0; } @@ -33,7 +33,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VileStart) // DEFINE_ACTION_FUNCTION(AActor, A_StartFire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "vile/firestrt", 1, ATTN_NORM); A_Fire (self, 0); return 0; @@ -41,7 +41,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_StartFire) DEFINE_ACTION_FUNCTION(AActor, A_FireCrackle) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "vile/firecrkl", 1, ATTN_NORM); A_Fire (self, 0); return 0; @@ -49,7 +49,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireCrackle) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Fire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(height) { height = 0; } A_Fire(self, height); @@ -80,7 +80,7 @@ void A_Fire(AActor *self, double height) // DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(fire, AActor) { fire = PClass::FindActor("ArchvileFire"); } AActor *fog; @@ -111,7 +111,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileTarget) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_VileAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_SOUND_OPT (snd) { snd = "vile/stop"; } PARAM_INT_OPT (dmg) { dmg = 20; } PARAM_INT_OPT (blastdmg) { blastdmg = 70; } diff --git a/src/g_doom/a_bossbrain.cpp b/src/g_doom/a_bossbrain.cpp index 8d4163c09..84cd9040c 100644 --- a/src/g_doom/a_bossbrain.cpp +++ b/src/g_doom/a_bossbrain.cpp @@ -18,7 +18,7 @@ static FRandom pr_spawnfly ("SpawnFly"); DEFINE_ACTION_FUNCTION(AActor, A_BrainAwake) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // killough 3/26/98: only generates sound now S_Sound (self, CHAN_VOICE, "brain/sight", 1, ATTN_NONE); return 0; @@ -26,7 +26,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainAwake) DEFINE_ACTION_FUNCTION(AActor, A_BrainPain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_VOICE, "brain/pain", 1, ATTN_NONE); return 0; } @@ -56,7 +56,7 @@ static void BrainishExplosion (const DVector3 &pos) DEFINE_ACTION_FUNCTION(AActor, A_BrainScream) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); for (double x = -196; x < +320; x += 8) { @@ -69,7 +69,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainScream) DEFINE_ACTION_FUNCTION(AActor, A_BrainExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double x = pr_brainexplode.Random2() / 32.; DVector3 pos = self->Vec2OffsetZ(x, 0, 1 / 512. + pr_brainexplode() * 2); BrainishExplosion(pos); @@ -78,7 +78,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainExplode) DEFINE_ACTION_FUNCTION(AActor, A_BrainDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // [RH] If noexit, then don't end the level. if ((deathmatch || alwaysapplydmflags) && (dmflags & DF_NO_EXIT)) @@ -111,7 +111,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainDie) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BrainSpit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } DSpotState *state = DSpotState::GetSpotState(); @@ -297,7 +297,7 @@ static void SpawnFly(AActor *self, PClassActor *spawntype, FSoundID sound) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnFly) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT (spawntype, AActor) { spawntype = NULL; } FSoundID sound; @@ -318,7 +318,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnFly) // travelling cube sound DEFINE_ACTION_FUNCTION(AActor, A_SpawnSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "brain/cube", 1, ATTN_IDLE); SpawnFly(self, PClass::FindActor("SpawnFire"), "brain/spawn"); return 0; diff --git a/src/g_doom/a_bruiser.cpp b/src/g_doom/a_bruiser.cpp index 0d2f83aee..1d2be64f0 100644 --- a/src/g_doom/a_bruiser.cpp +++ b/src/g_doom/a_bruiser.cpp @@ -3,7 +3,7 @@ static FRandom pr_bruisattack ("BruisAttack"); DEFINE_ACTION_FUNCTION(AActor, A_BruisAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_doom/a_cacodemon.cpp b/src/g_doom/a_cacodemon.cpp index 775580c29..354443bd6 100644 --- a/src/g_doom/a_cacodemon.cpp +++ b/src/g_doom/a_cacodemon.cpp @@ -14,7 +14,7 @@ static FRandom pr_headattack ("HeadAttack"); DEFINE_ACTION_FUNCTION(AActor, A_HeadAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_doom/a_cyberdemon.cpp b/src/g_doom/a_cyberdemon.cpp index 55d9181bf..6e78759c3 100644 --- a/src/g_doom/a_cyberdemon.cpp +++ b/src/g_doom/a_cyberdemon.cpp @@ -9,7 +9,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CyberAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -21,7 +21,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CyberAttack) DEFINE_ACTION_FUNCTION(AActor, A_Hoof) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "cyber/hoof", 1, ATTN_IDLE); A_Chase (stack, self); diff --git a/src/g_doom/a_demon.cpp b/src/g_doom/a_demon.cpp index 330b02b30..5ac3e9e74 100644 --- a/src/g_doom/a_demon.cpp +++ b/src/g_doom/a_demon.cpp @@ -13,7 +13,7 @@ static FRandom pr_sargattack ("SargAttack"); DEFINE_ACTION_FUNCTION(AActor, A_SargAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_doom/a_doomimp.cpp b/src/g_doom/a_doomimp.cpp index 6130d39ca..1b9dd9485 100644 --- a/src/g_doom/a_doomimp.cpp +++ b/src/g_doom/a_doomimp.cpp @@ -17,7 +17,7 @@ static FRandom pr_troopattack ("TroopAttack"); // DEFINE_ACTION_FUNCTION(AActor, A_TroopAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_doom/a_doommisc.cpp b/src/g_doom/a_doommisc.cpp index b68ded59d..a4eca67b7 100644 --- a/src/g_doom/a_doommisc.cpp +++ b/src/g_doom/a_doommisc.cpp @@ -44,7 +44,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BarrelDestroy) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (dmflags2 & DF2_BARRELS_RESPAWN) { diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index fd60e85d8..f7511b2be 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -28,7 +28,7 @@ static FRandom pr_oldbfg ("OldBFG"); // DEFINE_ACTION_FUNCTION(AActor, A_Punch) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); DAngle angle; int damage; @@ -69,7 +69,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Punch) // DEFINE_ACTION_FUNCTION(AActor, A_FirePistol) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); bool accurate; @@ -115,7 +115,7 @@ enum SAW_Flags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_SOUND_OPT (fullsound) { fullsound = "weapons/sawfull"; } PARAM_SOUND_OPT (hitsound) { hitsound = "weapons/sawhit"; } PARAM_INT_OPT (damage) { damage = 2; } @@ -257,7 +257,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Saw) // DEFINE_ACTION_FUNCTION(AActor, A_FireShotgun) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); int i; player_t *player; @@ -291,7 +291,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireShotgun) // DEFINE_ACTION_FUNCTION(AActor, A_FireShotgun2) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); int i; DAngle angle; @@ -338,21 +338,21 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireShotgun2) DEFINE_ACTION_FUNCTION(AActor, A_OpenShotgun2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/sshoto", 1, ATTN_NORM); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_LoadShotgun2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/sshotl", 1, ATTN_NORM); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_CloseShotgun2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/sshotc", 1, ATTN_NORM); A_ReFire (self); return 0; @@ -411,7 +411,7 @@ void P_SetSafeFlash(AWeapon *weapon, player_t *player, FState *flashstate, int i // DEFINE_ACTION_FUNCTION(AActor, A_FireCGun) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); player_t *player; @@ -456,7 +456,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireCGun) // DEFINE_ACTION_FUNCTION(AActor, A_FireMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); player_t *player; @@ -479,7 +479,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMissile) // DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireSTGrenade) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_CLASS_OPT(grenade, AActor) { grenade = PClass::FindActor("Grenade"); } player_t *player; @@ -511,7 +511,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireSTGrenade) // DEFINE_ACTION_FUNCTION(AActor, A_FirePlasma) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); player_t *player; @@ -574,21 +574,21 @@ static void FireRailgun(AActor *self, int offset_xy, bool fromweapon) DEFINE_ACTION_FUNCTION(AActor, A_FireRailgun) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); FireRailgun(self, 0, ACTION_CALL_FROM_PSPRITE()); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_FireRailgunRight) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); FireRailgun(self, 10, ACTION_CALL_FROM_PSPRITE()); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_FireRailgunLeft) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); FireRailgun(self, -10, ACTION_CALL_FROM_PSPRITE()); return 0; } @@ -605,7 +605,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RailWait) DEFINE_ACTION_FUNCTION(AActor, A_FireBFG) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); player_t *player; @@ -638,7 +638,7 @@ enum BFG_Flags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT (spraytype, AActor) { spraytype = NULL; } PARAM_INT_OPT (numrays) { numrays = 0; } PARAM_INT_OPT (damagecnt) { damagecnt = 0; } @@ -722,7 +722,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray) // DEFINE_ACTION_FUNCTION(AActor, A_BFGsound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/bfgf", 1, ATTN_NORM); return 0; } @@ -738,7 +738,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BFGsound) DEFINE_ACTION_FUNCTION(AActor, A_FireOldBFG) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PClassActor *plasma[] = { PClass::FindActor("PlasmaBall1"), PClass::FindActor("PlasmaBall2") }; AActor * mo = NULL; diff --git a/src/g_doom/a_fatso.cpp b/src/g_doom/a_fatso.cpp index eeef39984..d84046104 100644 --- a/src/g_doom/a_fatso.cpp +++ b/src/g_doom/a_fatso.cpp @@ -19,7 +19,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FatRaise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FaceTarget (self); S_Sound (self, CHAN_WEAPON, "fatso/raiseguns", 1, ATTN_NORM); @@ -28,7 +28,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FatRaise) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FatAttack1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } AActor *missile; @@ -54,7 +54,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FatAttack1) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FatAttack2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } AActor *missile; @@ -80,7 +80,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FatAttack2) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FatAttack3) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } AActor *missile; @@ -122,7 +122,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Mushroom) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT (spawntype, AActor) { spawntype = NULL; } PARAM_INT_OPT (n) { n = 0; } PARAM_INT_OPT (flags) { flags = 0; } diff --git a/src/g_doom/a_keen.cpp b/src/g_doom/a_keen.cpp index 5c57128a3..3040e0545 100644 --- a/src/g_doom/a_keen.cpp +++ b/src/g_doom/a_keen.cpp @@ -16,7 +16,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(doortag) { doortag = 666; } A_Unblock(self, false); diff --git a/src/g_doom/a_lostsoul.cpp b/src/g_doom/a_lostsoul.cpp index 35468ac08..18b8251e9 100644 --- a/src/g_doom/a_lostsoul.cpp +++ b/src/g_doom/a_lostsoul.cpp @@ -36,7 +36,7 @@ void A_SkullAttack(AActor *self, double speed) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(speed) { speed = SKULLSPEED; } if (speed <= 0) @@ -47,7 +47,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullAttack) DEFINE_ACTION_FUNCTION(AActor, A_BetaSkullAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage; if (!self || !self->target || self->target->GetSpecies() == self->GetSpecies()) diff --git a/src/g_doom/a_painelemental.cpp b/src/g_doom/a_painelemental.cpp index 8a0aa41bf..30136f9f7 100644 --- a/src/g_doom/a_painelemental.cpp +++ b/src/g_doom/a_painelemental.cpp @@ -147,7 +147,7 @@ void A_PainShootSkull (AActor *self, DAngle Angle, PClassActor *spawntype, int f // DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PainAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -165,7 +165,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PainAttack) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DualPainAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } if (!self->target) @@ -179,7 +179,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DualPainAttack) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PainDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, AActor) { spawntype = NULL; } if (self->target != NULL && self->IsFriend(self->target)) diff --git a/src/g_doom/a_possessed.cpp b/src/g_doom/a_possessed.cpp index e665e8f11..0b9a9ecfd 100644 --- a/src/g_doom/a_possessed.cpp +++ b/src/g_doom/a_possessed.cpp @@ -20,7 +20,7 @@ static FRandom pr_cposrefire ("CPosRefire"); // DEFINE_ACTION_FUNCTION(AActor, A_PosAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage; DAngle angle; @@ -60,7 +60,7 @@ static void A_SPosAttack2 (AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_SPosAttackUseAtkSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -74,7 +74,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SPosAttackUseAtkSound) // meant for Dehacked only. DEFINE_ACTION_FUNCTION(AActor, A_SPosAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -86,7 +86,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SPosAttack) DEFINE_ACTION_FUNCTION(AActor, A_CPosAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; DAngle bangle; @@ -115,7 +115,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CPosAttack) DEFINE_ACTION_FUNCTION(AActor, A_CPosRefire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // keep firing unless target got out of sight A_FaceTarget (self); diff --git a/src/g_doom/a_revenant.cpp b/src/g_doom/a_revenant.cpp index adb0ea100..0ffaed753 100644 --- a/src/g_doom/a_revenant.cpp +++ b/src/g_doom/a_revenant.cpp @@ -20,7 +20,7 @@ static FRandom pr_skelfist ("SkelFist"); // DEFINE_ACTION_FUNCTION(AActor, A_SkelMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *missile; @@ -44,7 +44,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SkelMissile) DEFINE_ACTION_FUNCTION(AActor, A_Tracer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double dist; double slope; @@ -123,7 +123,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Tracer) DEFINE_ACTION_FUNCTION(AActor, A_SkelWhoosh) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -134,7 +134,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SkelWhoosh) DEFINE_ACTION_FUNCTION(AActor, A_SkelFist) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_doom/a_scriptedmarine.cpp b/src/g_doom/a_scriptedmarine.cpp index 76f3e4577..61c7c8ac4 100644 --- a/src/g_doom/a_scriptedmarine.cpp +++ b/src/g_doom/a_scriptedmarine.cpp @@ -150,7 +150,7 @@ void AScriptedMarine::Tick () DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Refire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT(ignoremissile) { ignoremissile = false; } if (self->target == NULL || self->target->health <= 0) @@ -182,7 +182,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Refire) DEFINE_ACTION_FUNCTION(AActor, A_M_SawRefire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL || self->target->health <= 0) { @@ -204,7 +204,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_SawRefire) DEFINE_ACTION_FUNCTION(AActor, A_MarineNoise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (static_cast(self)->CurrentWeapon == AScriptedMarine::WEAPON_Chainsaw) { @@ -221,7 +221,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MarineNoise) DEFINE_ACTION_FUNCTION(AActor, A_MarineChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_MarineNoise, self); A_Chase (stack, self); return 0; @@ -235,7 +235,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MarineChase) DEFINE_ACTION_FUNCTION(AActor, A_MarineLook) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_MarineNoise, self); CALL_ACTION(A_Look, self); return 0; @@ -249,7 +249,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MarineLook) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Saw) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_SOUND_OPT (fullsound) { fullsound = "weapons/sawfull"; } PARAM_SOUND_OPT (hitsound) { hitsound = "weapons/sawhit"; } PARAM_INT_OPT (damage) { damage = 2; } @@ -347,7 +347,7 @@ static void MarinePunch(AActor *self, int damagemul) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Punch) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT(mult); MarinePunch(self, mult); @@ -384,7 +384,7 @@ void P_GunShot2 (AActor *mo, bool accurate, DAngle pitch, PClassActor *pufftype) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_FirePistol) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL(accurate); if (self->target == NULL) @@ -405,7 +405,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_FirePistol) DEFINE_ACTION_FUNCTION(AActor, A_M_FireShotgun) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle pitch; @@ -431,7 +431,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FireShotgun) DEFINE_ACTION_FUNCTION(AActor, A_M_CheckAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->special1 != 0 || self->target == NULL) { @@ -452,7 +452,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_CheckAttack) DEFINE_ACTION_FUNCTION(AActor, A_M_FireShotgun2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle pitch; @@ -483,7 +483,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FireShotgun2) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_FireCGun) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL(accurate); if (self->target == NULL) @@ -508,7 +508,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_FireCGun) DEFINE_ACTION_FUNCTION(AActor, A_M_FireMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -533,7 +533,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FireMissile) DEFINE_ACTION_FUNCTION(AActor, A_M_FireRailgun) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -551,7 +551,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FireRailgun) DEFINE_ACTION_FUNCTION(AActor, A_M_FirePlasma) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -570,7 +570,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_FirePlasma) DEFINE_ACTION_FUNCTION(AActor, A_M_BFGsound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -597,7 +597,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_M_BFGsound) DEFINE_ACTION_FUNCTION(AActor, A_M_FireBFG) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; diff --git a/src/g_doom/a_spidermaster.cpp b/src/g_doom/a_spidermaster.cpp index ab12db4f0..37d0deb18 100644 --- a/src/g_doom/a_spidermaster.cpp +++ b/src/g_doom/a_spidermaster.cpp @@ -13,7 +13,7 @@ static FRandom pr_spidrefire ("SpidRefire"); DEFINE_ACTION_FUNCTION(AActor, A_SpidRefire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // keep firing unless target got out of sight A_FaceTarget (self); @@ -33,7 +33,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpidRefire) DEFINE_ACTION_FUNCTION(AActor, A_Metal) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "spider/walk", 1, ATTN_IDLE); A_Chase (stack, self); diff --git a/src/g_heretic/a_chicken.cpp b/src/g_heretic/a_chicken.cpp index 78eb7ca8d..883eac353 100644 --- a/src/g_heretic/a_chicken.cpp +++ b/src/g_heretic/a_chicken.cpp @@ -66,7 +66,7 @@ void AChickenPlayer::MorphPlayerThink () DEFINE_ACTION_FUNCTION(AActor, A_ChicAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) { @@ -89,7 +89,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChicAttack) DEFINE_ACTION_FUNCTION(AActor, A_Feathers) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; int count; @@ -138,7 +138,7 @@ void P_UpdateBeak (AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_BeakRaise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -170,7 +170,7 @@ void P_PlayPeck (AActor *chicken) DEFINE_ACTION_FUNCTION(AActor, A_BeakAttackPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -205,7 +205,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BeakAttackPL1) DEFINE_ACTION_FUNCTION(AActor, A_BeakAttackPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; diff --git a/src/g_heretic/a_dsparil.cpp b/src/g_heretic/a_dsparil.cpp index 632260648..5ab4067d3 100644 --- a/src/g_heretic/a_dsparil.cpp +++ b/src/g_heretic/a_dsparil.cpp @@ -28,7 +28,7 @@ static FRandom pr_bluespark ("BlueSpark"); DEFINE_ACTION_FUNCTION(AActor, A_Sor1Pain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special1 = 20; // Number of steps to walk fast CALL_ACTION(A_Pain, self); @@ -43,7 +43,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Sor1Pain) DEFINE_ACTION_FUNCTION(AActor, A_Sor1Chase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->special1) { @@ -64,7 +64,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Sor1Chase) DEFINE_ACTION_FUNCTION(AActor, A_Srcr1Attack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; DAngle angle; @@ -120,7 +120,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Srcr1Attack) DEFINE_ACTION_FUNCTION(AActor, A_SorcererRise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -173,7 +173,7 @@ void P_DSparilTeleport (AActor *actor) DEFINE_ACTION_FUNCTION(AActor, A_Srcr2Decide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); static const int chance[] = { @@ -201,7 +201,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Srcr2Decide) DEFINE_ACTION_FUNCTION(AActor, A_Srcr2Attack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int chance; @@ -243,7 +243,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Srcr2Attack) DEFINE_ACTION_FUNCTION(AActor, A_BlueSpark) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; AActor *mo; @@ -266,7 +266,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BlueSpark) DEFINE_ACTION_FUNCTION(AActor, A_GenWizard) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -301,7 +301,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_GenWizard) DEFINE_ACTION_FUNCTION(AActor, A_Sor2DthInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special1 = 7; // Animation loop counter P_Massacre (); // Kill monsters early @@ -316,7 +316,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Sor2DthInit) DEFINE_ACTION_FUNCTION(AActor, A_Sor2DthLoop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (--self->special1) { // Need to loop diff --git a/src/g_heretic/a_hereticartifacts.cpp b/src/g_heretic/a_hereticartifacts.cpp index 1c4677cb6..eceb2cfe1 100644 --- a/src/g_heretic/a_hereticartifacts.cpp +++ b/src/g_heretic/a_hereticartifacts.cpp @@ -47,7 +47,7 @@ bool AArtiTomeOfPower::Use (bool pickup) DEFINE_ACTION_FUNCTION(AActor, A_TimeBomb) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->AddZ(32, false); self->RenderStyle = STYLE_Add; diff --git a/src/g_heretic/a_hereticimp.cpp b/src/g_heretic/a_hereticimp.cpp index 41e207ef1..39dfb049e 100644 --- a/src/g_heretic/a_hereticimp.cpp +++ b/src/g_heretic/a_hereticimp.cpp @@ -21,7 +21,7 @@ static FRandom pr_imp ("ImpExplode"); DEFINE_ACTION_FUNCTION(AActor, A_ImpMsAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target || pr_impmsatk() > 64) { @@ -40,7 +40,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ImpMsAttack) DEFINE_ACTION_FUNCTION(AActor, A_ImpExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *chunk; @@ -70,7 +70,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ImpExplode) DEFINE_ACTION_FUNCTION(AActor, A_ImpDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_SOLID; self->flags2 |= MF2_FLOORCLIP; @@ -85,7 +85,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ImpDeath) DEFINE_ACTION_FUNCTION(AActor, A_ImpXDeath1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_SOLID; self->flags |= MF_NOGRAVITY; diff --git a/src/g_heretic/a_hereticmisc.cpp b/src/g_heretic/a_hereticmisc.cpp index d3ffbac23..02c1393dd 100644 --- a/src/g_heretic/a_hereticmisc.cpp +++ b/src/g_heretic/a_hereticmisc.cpp @@ -47,7 +47,7 @@ static FRandom pr_volcimpact ("VolcBallImpact"); DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PodPain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT (gootype, AActor) { gootype = PClass::FindActor("PodGoo"); } int count; @@ -78,7 +78,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PodPain) DEFINE_ACTION_FUNCTION(AActor, A_RemovePod) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -102,7 +102,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RemovePod) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MakePod) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(podtype, AActor) { podtype = PClass::FindActor("Pod"); } AActor *mo; @@ -133,7 +133,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MakePod) DEFINE_ACTION_FUNCTION(AActor, A_AccTeleGlitter) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (++self->health > 35) { @@ -151,7 +151,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AccTeleGlitter) DEFINE_ACTION_FUNCTION(AActor, A_VolcanoSet) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->tics = 105 + (pr_volcano() & 127); return 0; @@ -165,7 +165,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VolcanoSet) DEFINE_ACTION_FUNCTION(AActor, A_VolcanoBlast) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; int count; @@ -193,7 +193,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_VolcanoBlast) DEFINE_ACTION_FUNCTION(AActor, A_VolcBallImpact) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); unsigned int i; AActor *tiny; diff --git a/src/g_heretic/a_hereticweaps.cpp b/src/g_heretic/a_hereticweaps.cpp index c86cafce7..51d759640 100644 --- a/src/g_heretic/a_hereticweaps.cpp +++ b/src/g_heretic/a_hereticweaps.cpp @@ -61,7 +61,7 @@ extern bool P_AutoUseChaosDevice (player_t *player); DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_StaffAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; DAngle slope; @@ -107,7 +107,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_StaffAttack) DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -144,7 +144,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL1) DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; DAngle angle; @@ -187,7 +187,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireGoldWandPL2) DEFINE_ACTION_FUNCTION(AActor, A_FireCrossbowPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -216,7 +216,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireCrossbowPL1) DEFINE_ACTION_FUNCTION(AActor, A_FireCrossbowPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -247,7 +247,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireCrossbowPL2) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GauntletAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle Angle; int damage; @@ -421,7 +421,7 @@ void FireMacePL1B (AActor *actor) DEFINE_ACTION_FUNCTION(AActor, A_FireMacePL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *ball; player_t *player; @@ -461,7 +461,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMacePL1) DEFINE_ACTION_FUNCTION(AActor, A_MacePL1Check) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->special1 == 0) { @@ -498,7 +498,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MacePL1Check) DEFINE_ACTION_FUNCTION(AActor, A_MaceBallImpact) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if ((self->health != MAGIC_JUNK) && (self->flags & MF_INBOUNCE)) { // Bounce @@ -526,7 +526,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MaceBallImpact) DEFINE_ACTION_FUNCTION(AActor, A_MaceBallImpact2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *tiny; @@ -579,7 +579,7 @@ boom: DEFINE_ACTION_FUNCTION(AActor, A_FireMacePL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; player_t *player; @@ -618,7 +618,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMacePL2) DEFINE_ACTION_FUNCTION(AActor, A_DeathBallImpact) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; AActor *target; @@ -761,7 +761,7 @@ int ARipper::DoSpecialDamage (AActor *target, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_FireBlasterPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -798,7 +798,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBlasterPL1) DEFINE_ACTION_FUNCTION(AActor, A_SpawnRippers) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); unsigned int i; DAngle angle; @@ -888,7 +888,7 @@ void ARainTracker::Serialize(FSerializer &arc) DEFINE_ACTION_FUNCTION(AActor, A_FireSkullRodPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; player_t *player; @@ -924,7 +924,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSkullRodPL1) DEFINE_ACTION_FUNCTION(AActor, A_FireSkullRodPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; AActor *MissileActor; @@ -964,7 +964,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSkullRodPL2) DEFINE_ACTION_FUNCTION(AActor, A_AddPlayerRain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); ARainTracker *tracker; @@ -1024,7 +1024,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AddPlayerRain) DEFINE_ACTION_FUNCTION(AActor, A_SkullRodStorm) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; ARainTracker *tracker; @@ -1095,7 +1095,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SkullRodStorm) DEFINE_ACTION_FUNCTION(AActor, A_RainImpact) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->Z() > self->floorz) { self->SetState (self->FindState("NotFloor")); @@ -1115,7 +1115,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RainImpact) DEFINE_ACTION_FUNCTION(AActor, A_HideInCeiling) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // We use bouncecount to store the 3D floor index double foo; @@ -1218,7 +1218,7 @@ int APhoenixFX2::DoSpecialDamage (AActor *target, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_FirePhoenixPL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -1246,7 +1246,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FirePhoenixPL1) DEFINE_ACTION_FUNCTION(AActor, A_PhoenixPuff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *puff; DAngle angle; @@ -1271,7 +1271,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PhoenixPuff) DEFINE_ACTION_FUNCTION(AActor, A_InitPhoenixPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -1294,7 +1294,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_InitPhoenixPL2) DEFINE_ACTION_FUNCTION(AActor, A_FirePhoenixPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -1347,7 +1347,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FirePhoenixPL2) DEFINE_ACTION_FUNCTION(AActor, A_ShutdownPhoenixPL2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -1373,7 +1373,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ShutdownPhoenixPL2) DEFINE_ACTION_FUNCTION(AActor, A_FlameEnd) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Vel.Z += 1.5; return 0; @@ -1387,7 +1387,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FlameEnd) DEFINE_ACTION_FUNCTION(AActor, A_FloatPuff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Vel.Z += 1.8; return 0; diff --git a/src/g_heretic/a_ironlich.cpp b/src/g_heretic/a_ironlich.cpp index c80a7bbed..e2e1cb021 100644 --- a/src/g_heretic/a_ironlich.cpp +++ b/src/g_heretic/a_ironlich.cpp @@ -63,7 +63,7 @@ int AWhirlwind::DoSpecialDamage (AActor *target, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_LichAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; AActor *fire; @@ -143,7 +143,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LichAttack) DEFINE_ACTION_FUNCTION(AActor, A_WhirlwindSeek) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->health -= 3; if (self->health < 0) @@ -174,7 +174,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WhirlwindSeek) DEFINE_ACTION_FUNCTION(AActor, A_LichIceImpact) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); unsigned int i; AActor *shard; @@ -199,7 +199,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LichIceImpact) DEFINE_ACTION_FUNCTION(AActor, A_LichFireGrow) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->health--; self->AddZ(9.); diff --git a/src/g_heretic/a_knight.cpp b/src/g_heretic/a_knight.cpp index 9c4ae2473..a3125f77d 100644 --- a/src/g_heretic/a_knight.cpp +++ b/src/g_heretic/a_knight.cpp @@ -21,7 +21,7 @@ static FRandom pr_knightatk ("KnightAttack"); DEFINE_ACTION_FUNCTION(AActor, A_DripBlood) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -42,7 +42,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DripBlood) DEFINE_ACTION_FUNCTION(AActor, A_KnightAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) { diff --git a/src/g_heretic/a_wizard.cpp b/src/g_heretic/a_wizard.cpp index e66bc5531..271fd5592 100644 --- a/src/g_heretic/a_wizard.cpp +++ b/src/g_heretic/a_wizard.cpp @@ -20,7 +20,7 @@ static FRandom pr_wizatk3 ("WizAtk3"); DEFINE_ACTION_FUNCTION(AActor, A_GhostOff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->RenderStyle = STYLE_Normal; self->flags3 &= ~MF3_GHOST; @@ -35,7 +35,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_GhostOff) DEFINE_ACTION_FUNCTION(AActor, A_WizAtk1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FaceTarget (self); CALL_ACTION(A_GhostOff, self); @@ -50,7 +50,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WizAtk1) DEFINE_ACTION_FUNCTION(AActor, A_WizAtk2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FaceTarget (self); self->Alpha = HR_SHADOW; @@ -67,7 +67,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WizAtk2) DEFINE_ACTION_FUNCTION(AActor, A_WizAtk3) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; diff --git a/src/g_hexen/a_bats.cpp b/src/g_hexen/a_bats.cpp index 875910059..5be91b69b 100644 --- a/src/g_hexen/a_bats.cpp +++ b/src/g_hexen/a_bats.cpp @@ -27,7 +27,7 @@ static FRandom pr_batmove ("BatMove"); DEFINE_ACTION_FUNCTION(AActor, A_BatSpawnInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special1 = 0; // Frequency count return 0; @@ -35,7 +35,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BatSpawnInit) DEFINE_ACTION_FUNCTION(AActor, A_BatSpawn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int delta; @@ -64,7 +64,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BatSpawn) DEFINE_ACTION_FUNCTION(AActor, A_BatMove) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle newangle; diff --git a/src/g_hexen/a_bishop.cpp b/src/g_hexen/a_bishop.cpp index a88daa23b..bd9f24061 100644 --- a/src/g_hexen/a_bishop.cpp +++ b/src/g_hexen/a_bishop.cpp @@ -24,7 +24,7 @@ static FRandom pr_pain ("BishopPainBlur"); DEFINE_ACTION_FUNCTION(AActor, A_BishopAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) { @@ -51,7 +51,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopAttack) DEFINE_ACTION_FUNCTION(AActor, A_BishopAttack2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -78,7 +78,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopAttack2) DEFINE_ACTION_FUNCTION(AActor, A_BishopMissileWeave) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_Weave(self, 2, 2, 2., 1.); return 0; @@ -92,7 +92,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopMissileWeave) DEFINE_ACTION_FUNCTION(AActor, A_BishopDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (pr_decide() < 220) { @@ -113,7 +113,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopDecide) DEFINE_ACTION_FUNCTION(AActor, A_BishopDoBlur) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special1 = (pr_doblur() & 3) + 3; // Random number of blurs if (pr_doblur() < 120) @@ -140,7 +140,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopDoBlur) DEFINE_ACTION_FUNCTION(AActor, A_BishopSpawnBlur) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -172,7 +172,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopSpawnBlur) DEFINE_ACTION_FUNCTION(AActor, A_BishopChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double newz = self->Z() - BobSin(self->special2) / 2.; self->special2 = (self->special2 + 4) & 63; @@ -189,7 +189,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopChase) DEFINE_ACTION_FUNCTION(AActor, A_BishopPuff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -209,7 +209,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BishopPuff) DEFINE_ACTION_FUNCTION(AActor, A_BishopPainBlur) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; diff --git a/src/g_hexen/a_blastradius.cpp b/src/g_hexen/a_blastradius.cpp index f906d247c..0b0ab5d10 100644 --- a/src/g_hexen/a_blastradius.cpp +++ b/src/g_hexen/a_blastradius.cpp @@ -95,7 +95,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS (AActor, A_Blast) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT_OPT (blastflags) { blastflags = 0; } PARAM_FLOAT_OPT (strength) { strength = 255; } PARAM_FLOAT_OPT (radius) { radius = 255; } diff --git a/src/g_hexen/a_centaur.cpp b/src/g_hexen/a_centaur.cpp index 75049650d..9bf5e6046 100644 --- a/src/g_hexen/a_centaur.cpp +++ b/src/g_hexen/a_centaur.cpp @@ -16,7 +16,7 @@ static FRandom pr_centaurdefend ("CentaurDefend"); DEFINE_ACTION_FUNCTION(AActor, A_CentaurDefend) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FaceTarget (self); if (self->CheckMeleeRange() && pr_centaurdefend() < 32) diff --git a/src/g_hexen/a_clericflame.cpp b/src/g_hexen/a_clericflame.cpp index a9c8b6378..b03b9b6b9 100644 --- a/src/g_hexen/a_clericflame.cpp +++ b/src/g_hexen/a_clericflame.cpp @@ -66,7 +66,7 @@ void ACFlameMissile::Effect () DEFINE_ACTION_FUNCTION(AActor, A_CFlameAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -93,7 +93,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CFlameAttack) DEFINE_ACTION_FUNCTION(AActor, A_CFlamePuff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; self->Vel.Zero(); @@ -109,7 +109,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CFlamePuff) DEFINE_ACTION_FUNCTION(AActor, A_CFlameMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; DAngle an; @@ -159,7 +159,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CFlameMissile) DEFINE_ACTION_FUNCTION(AActor, A_CFlameRotate) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle an = self->Angles.Yaw + 90.; self->VelFromAngle(an, FLAMEROTSPEED); diff --git a/src/g_hexen/a_clericholy.cpp b/src/g_hexen/a_clericholy.cpp index f660b1e7d..b87bd3986 100644 --- a/src/g_hexen/a_clericholy.cpp +++ b/src/g_hexen/a_clericholy.cpp @@ -131,7 +131,7 @@ bool AHolySpirit::SpecialBlastHandling (AActor *source, double strength) DEFINE_ACTION_FUNCTION(AActor, A_CHolyAttack2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int j; AActor *mo; @@ -211,7 +211,7 @@ void SpawnSpiritTail (AActor *spirit) DEFINE_ACTION_FUNCTION(AActor, A_CHolyAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; FTranslatedLineTarget t; @@ -245,7 +245,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CHolyAttack) DEFINE_ACTION_FUNCTION(AActor, A_CHolyPalette) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -328,7 +328,7 @@ static void CHolyTailRemove (AActor *actor) DEFINE_ACTION_FUNCTION(AActor, A_CHolyTail) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *parent; @@ -446,7 +446,7 @@ static void CHolySeekerMissile (AActor *actor, DAngle thresh, DAngle turnMax) DEFINE_ACTION_FUNCTION(AActor, A_CHolySeek) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->health--; if (self->health <= 0) @@ -481,7 +481,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CHolySeek) DEFINE_ACTION_FUNCTION(AActor, A_CHolyCheckScream) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_CHolySeek, self); if (pr_checkscream() < 20) @@ -504,7 +504,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CHolyCheckScream) DEFINE_ACTION_FUNCTION(AActor, A_ClericAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_hexen/a_clericmace.cpp b/src/g_hexen/a_clericmace.cpp index fce979af1..9b8148930 100644 --- a/src/g_hexen/a_clericmace.cpp +++ b/src/g_hexen/a_clericmace.cpp @@ -15,7 +15,7 @@ static FRandom pr_maceatk ("CMaceAttack"); DEFINE_ACTION_FUNCTION(AActor, A_CMaceAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; diff --git a/src/g_hexen/a_clericstaff.cpp b/src/g_hexen/a_clericstaff.cpp index 6b54d4de3..a0e6b94c6 100644 --- a/src/g_hexen/a_clericstaff.cpp +++ b/src/g_hexen/a_clericstaff.cpp @@ -46,7 +46,7 @@ int ACStaffMissile::DoSpecialDamage (AActor *target, int damage, FName damagetyp DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); APlayerPawn *pmo; int damage; @@ -115,7 +115,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck) DEFINE_ACTION_FUNCTION(AActor, A_CStaffAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; player_t *player; @@ -153,7 +153,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffAttack) DEFINE_ACTION_FUNCTION(AActor, A_CStaffMissileSlither) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_Weave(self, 3, 0, 1., 0.); return 0; @@ -167,7 +167,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffMissileSlither) DEFINE_ACTION_FUNCTION(AActor, A_CStaffInitBlink) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->weaponspecial = (pr_blink()>>1)+20; return 0; @@ -181,7 +181,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffInitBlink) DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheckBlink) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player && self->player->ReadyWeapon) { diff --git a/src/g_hexen/a_dragon.cpp b/src/g_hexen/a_dragon.cpp index ca56525a9..b79d92b36 100644 --- a/src/g_hexen/a_dragon.cpp +++ b/src/g_hexen/a_dragon.cpp @@ -150,7 +150,7 @@ static void DragonSeek (AActor *actor, DAngle thresh, DAngle turnMax) DEFINE_ACTION_FUNCTION(AActor, A_DragonInitFlight) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); FActorIterator iterator (self->tid); @@ -175,7 +175,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonInitFlight) DEFINE_ACTION_FUNCTION(AActor, A_DragonFlight) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; @@ -216,7 +216,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonFlight) DEFINE_ACTION_FUNCTION(AActor, A_DragonFlap) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_DragonFlight, self); if (pr_dragonflap() < 240) @@ -238,7 +238,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonFlap) DEFINE_ACTION_FUNCTION(AActor, A_DragonAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); P_SpawnMissile (self, self->target, PClass::FindActor("DragonFireball")); return 0; @@ -252,7 +252,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonAttack) DEFINE_ACTION_FUNCTION(AActor, A_DragonFX2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int i; @@ -283,7 +283,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonFX2) DEFINE_ACTION_FUNCTION(AActor, A_DragonPain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_Pain, self); if (!self->tracer) @@ -301,7 +301,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DragonPain) DEFINE_ACTION_FUNCTION(AActor, A_DragonCheckCrash) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->Z() <= self->floorz) { diff --git a/src/g_hexen/a_fighteraxe.cpp b/src/g_hexen/a_fighteraxe.cpp index a194869f3..696dda019 100644 --- a/src/g_hexen/a_fighteraxe.cpp +++ b/src/g_hexen/a_fighteraxe.cpp @@ -68,7 +68,7 @@ FState *AFWeapAxe::GetAtkState (bool hold) DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckReady) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -95,7 +95,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckReady) DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckReadyG) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -122,7 +122,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckReadyG) DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckUp) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -149,7 +149,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckUp) DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckUpG) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -176,7 +176,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckUpG) DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckAtk) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -199,7 +199,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FAxeCheckAtk) DEFINE_ACTION_FUNCTION(AActor, A_FAxeAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int power; diff --git a/src/g_hexen/a_fighterhammer.cpp b/src/g_hexen/a_fighterhammer.cpp index f8fbe33e3..faa15d8af 100644 --- a/src/g_hexen/a_fighterhammer.cpp +++ b/src/g_hexen/a_fighterhammer.cpp @@ -25,7 +25,7 @@ static FRandom pr_hammeratk ("FHammerAtk"); DEFINE_ACTION_FUNCTION(AActor, A_FHammerAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -95,7 +95,7 @@ hammerdone: DEFINE_ACTION_FUNCTION(AActor, A_FHammerThrow) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; player_t *player; diff --git a/src/g_hexen/a_fighterplayer.cpp b/src/g_hexen/a_fighterplayer.cpp index d946c689c..020cec78e 100644 --- a/src/g_hexen/a_fighterplayer.cpp +++ b/src/g_hexen/a_fighterplayer.cpp @@ -99,7 +99,7 @@ static bool TryPunch(APlayerPawn *pmo, DAngle angle, int damage, int power) DEFINE_ACTION_FUNCTION(AActor, A_FPunchAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage; int i; diff --git a/src/g_hexen/a_fighterquietus.cpp b/src/g_hexen/a_fighterquietus.cpp index a86d4911a..6a4daabb2 100644 --- a/src/g_hexen/a_fighterquietus.cpp +++ b/src/g_hexen/a_fighterquietus.cpp @@ -78,7 +78,7 @@ int AFSwordMissile::DoSpecialDamage(AActor *victim, int damage, FName damagetype DEFINE_ACTION_FUNCTION(AActor, A_FSwordAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -109,7 +109,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FSwordAttack) DEFINE_ACTION_FUNCTION(AActor, A_FSwordFlames) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; @@ -131,7 +131,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FSwordFlames) DEFINE_ACTION_FUNCTION(AActor, A_FighterAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; diff --git a/src/g_hexen/a_firedemon.cpp b/src/g_hexen/a_firedemon.cpp index b60c904e3..cc9beaaeb 100644 --- a/src/g_hexen/a_firedemon.cpp +++ b/src/g_hexen/a_firedemon.cpp @@ -80,7 +80,7 @@ void A_FiredSpawnRock (AActor *actor) DEFINE_ACTION_FUNCTION(AActor, A_FiredRocks) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FiredSpawnRock (self); A_FiredSpawnRock (self); @@ -98,7 +98,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FiredRocks) DEFINE_ACTION_FUNCTION(AActor, A_SmBounce) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // give some more velocity (x,y,&z) self->SetZ(self->floorz + 1); @@ -116,7 +116,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SmBounce) DEFINE_ACTION_FUNCTION(AActor, A_FiredAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -133,7 +133,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FiredAttack) DEFINE_ACTION_FUNCTION(AActor, A_FiredChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int weaveindex = self->special1; AActor *target = self->target; @@ -226,7 +226,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FiredChase) DEFINE_ACTION_FUNCTION(AActor, A_FiredSplotch) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; diff --git a/src/g_hexen/a_flechette.cpp b/src/g_hexen/a_flechette.cpp index 3d9555843..bc13d5cf7 100644 --- a/src/g_hexen/a_flechette.cpp +++ b/src/g_hexen/a_flechette.cpp @@ -362,7 +362,7 @@ int APoisonCloud::DoSpecialDamage (AActor *victim, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -382,7 +382,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagInit) DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (--self->special1 <= 0) { @@ -403,7 +403,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagCheck) DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagDamage) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int bobIndex; @@ -422,7 +422,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PoisonBagDamage) DEFINE_ACTION_FUNCTION(AActor, A_CheckThrowBomb) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (--self->health <= 0) { @@ -439,7 +439,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckThrowBomb) DEFINE_ACTION_FUNCTION(AActor, A_CheckThrowBomb2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // [RH] Check using actual velocity, although the vel.z < 2 check still stands if (self->Vel.Z < 2 && self->Vel.LengthSquared() < (9./4.)) diff --git a/src/g_hexen/a_flies.cpp b/src/g_hexen/a_flies.cpp index 1023c12ae..7281dd8f2 100644 --- a/src/g_hexen/a_flies.cpp +++ b/src/g_hexen/a_flies.cpp @@ -60,7 +60,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FlySearch) // So search the sectors instead. We can't potentially find something all // the way on the other side of the map and we can't find invisible corpses, // but at least we aren't crippled on maps with lots of stuff going on. - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); validcount++; AActor *other = FindCorpse(self, self->Sector, 5); @@ -74,7 +74,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FlySearch) DEFINE_ACTION_FUNCTION(AActor, A_FlyBuzz) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *targ = self->target; diff --git a/src/g_hexen/a_fog.cpp b/src/g_hexen/a_fog.cpp index 98dbf62b7..6b2bc9706 100644 --- a/src/g_hexen/a_fog.cpp +++ b/src/g_hexen/a_fog.cpp @@ -27,7 +27,7 @@ static FRandom pr_fogspawn ("FogSpawn"); DEFINE_ACTION_FUNCTION(AActor, A_FogSpawn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); static const char *fogs[3] = { @@ -70,7 +70,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FogSpawn) DEFINE_ACTION_FUNCTION(AActor, A_FogMove) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double speed = self->args[0]; int weaveindex; diff --git a/src/g_hexen/a_heresiarch.cpp b/src/g_hexen/a_heresiarch.cpp index 267320029..03ffcc5d6 100644 --- a/src/g_hexen/a_heresiarch.cpp +++ b/src/g_hexen/a_heresiarch.cpp @@ -218,7 +218,7 @@ void ASorcBall1::DoFireSpell () DEFINE_ACTION_FUNCTION(AActor, A_SorcSpinBalls) { - PARAM_ACTION_PROLOGUE_TYPE(AHeresiarch); + PARAM_SELF_PROLOGUE(AHeresiarch); AActor *mo; @@ -254,7 +254,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcSpinBalls) DEFINE_ACTION_FUNCTION(AActor, A_SorcBallOrbit) { - PARAM_ACTION_PROLOGUE_TYPE(ASorcBall); + PARAM_SELF_PROLOGUE(ASorcBall); // [RH] If no parent, then die instead of crashing if (self->target == NULL) @@ -380,7 +380,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcBallOrbit) DEFINE_ACTION_FUNCTION(AActor, A_SpeedBalls) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->args[3] = SORC_ACCELERATE; // speed mode self->args[2] = SORCBALL_TERMINAL_SPEED; // target speed @@ -676,7 +676,7 @@ void A_SorcOffense2(AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_SorcBossAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->args[3] = SORC_ACCELERATE; self->args[2] = SORCBALL_INITIAL_SPEED; @@ -693,7 +693,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcBossAttack) DEFINE_ACTION_FUNCTION(AActor, A_SpawnFizzle) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int speed = (int)self->Speed; DAngle rangle; AActor *mo; @@ -725,7 +725,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnFizzle) DEFINE_ACTION_FUNCTION(AActor, A_SorcFX1Seek) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_DoBounceCheck (self, "SorcererHeadScream"); P_SeekerMissile(self, 2, 6); @@ -751,7 +751,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcFX1Seek) // Split ball in two DEFINE_ACTION_FUNCTION(AActor, A_SorcFX2Split) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -785,7 +785,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcFX2Split) DEFINE_ACTION_FUNCTION(AActor, A_SorcFX2Orbit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; DVector3 pos; @@ -852,7 +852,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcFX2Orbit) DEFINE_ACTION_FUNCTION(AActor, A_SpawnBishop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; mo = Spawn("Bishop", self->Pos(), ALLOW_REPLACE); @@ -881,7 +881,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnBishop) DEFINE_ACTION_FUNCTION(AActor, A_SorcererBishopEntry) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); Spawn("SorcFX3Explosion", self->Pos(), ALLOW_REPLACE); S_Sound (self, CHAN_VOICE, self->SeeSound, 1, ATTN_NORM); @@ -898,7 +898,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcererBishopEntry) DEFINE_ACTION_FUNCTION(AActor, A_SorcFX4Check) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->special2-- <= 0) { @@ -917,7 +917,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcFX4Check) DEFINE_ACTION_FUNCTION(AActor, A_SorcBallPop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "SorcererBallPop", 1, ATTN_NONE); self->flags &= ~MF_NOGRAVITY; @@ -961,7 +961,7 @@ void A_DoBounceCheck (AActor *self, const char *sound) DEFINE_ACTION_FUNCTION(AActor, A_BounceCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_DoBounceCheck (self, "SorcererBigBallExplode"); return 0; diff --git a/src/g_hexen/a_hexenspecialdecs.cpp b/src/g_hexen/a_hexenspecialdecs.cpp index 61d5780d1..866fc8372 100644 --- a/src/g_hexen/a_hexenspecialdecs.cpp +++ b/src/g_hexen/a_hexenspecialdecs.cpp @@ -55,7 +55,7 @@ void APottery1::HitFloor () DEFINE_ACTION_FUNCTION(AActor, A_PotteryExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo = NULL; int i; @@ -93,7 +93,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PotteryExplode) DEFINE_ACTION_FUNCTION(AActor, A_PotteryChooseBit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->SetState (self->FindState(NAME_Death) + 1 + 2*(pr_bit()%5)); self->tics = 256+(pr_bit()<<1); @@ -108,7 +108,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PotteryChooseBit) DEFINE_ACTION_FUNCTION(AActor, A_PotteryCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; @@ -152,7 +152,7 @@ void AZCorpseLynchedNoHeart::PostBeginPlay () DEFINE_ACTION_FUNCTION(AActor, A_CorpseBloodDrip) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (pr_drip() <= 128) { @@ -169,7 +169,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CorpseBloodDrip) DEFINE_ACTION_FUNCTION(AActor, A_CorpseExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int i; @@ -207,7 +207,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CorpseExplode) DEFINE_ACTION_FUNCTION(AActor, A_LeafSpawn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int i; @@ -238,7 +238,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LeafSpawn) DEFINE_ACTION_FUNCTION(AActor, A_LeafThrust) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (pr_leafthrust() <= 96) { @@ -255,7 +255,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LeafThrust) DEFINE_ACTION_FUNCTION(AActor, A_LeafCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special1++; if (self->special1 >= 20) @@ -287,7 +287,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LeafCheck) DEFINE_ACTION_FUNCTION(AActor, A_PoisonShroom) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->tics = 128 + (pr_shroom() << 1); return 0; @@ -301,7 +301,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PoisonShroom) DEFINE_ACTION_FUNCTION(AActor, A_SoAExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int i; @@ -362,7 +362,7 @@ void AZBell::Activate (AActor *activator) DEFINE_ACTION_FUNCTION(AActor, A_BellReset1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_NOGRAVITY; self->Height *= 4; @@ -383,7 +383,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BellReset1) DEFINE_ACTION_FUNCTION(AActor, A_BellReset2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_SHOOTABLE; self->flags &= ~MF_CORPSE; diff --git a/src/g_hexen/a_iceguy.cpp b/src/g_hexen/a_iceguy.cpp index d518c7db7..1163a117a 100644 --- a/src/g_hexen/a_iceguy.cpp +++ b/src/g_hexen/a_iceguy.cpp @@ -26,7 +26,7 @@ static const char *WispTypes[2] = DEFINE_ACTION_FUNCTION(AActor, A_IceGuyLook) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double dist; DAngle an; @@ -49,7 +49,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyLook) DEFINE_ACTION_FUNCTION(AActor, A_IceGuyChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double dist; DAngle an; @@ -78,7 +78,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyChase) DEFINE_ACTION_FUNCTION(AActor, A_IceGuyAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if(!self->target) { @@ -98,7 +98,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyAttack) DEFINE_ACTION_FUNCTION(AActor, A_IceGuyDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Vel.Zero(); self->Height = self->GetDefault()->Height; @@ -114,7 +114,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceGuyDie) DEFINE_ACTION_FUNCTION(AActor, A_IceGuyMissileExplode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; unsigned int i; diff --git a/src/g_hexen/a_korax.cpp b/src/g_hexen/a_korax.cpp index 01457b91c..2824d8c0a 100644 --- a/src/g_hexen/a_korax.cpp +++ b/src/g_hexen/a_korax.cpp @@ -88,7 +88,7 @@ extern void SpawnSpiritTail (AActor *spirit); DEFINE_ACTION_FUNCTION(AActor, A_KoraxChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *spot; @@ -155,7 +155,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KoraxChase) DEFINE_ACTION_FUNCTION(AActor, A_KoraxBonePop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int i; @@ -201,7 +201,7 @@ void KSpiritInit (AActor *spirit, AActor *korax) DEFINE_ACTION_FUNCTION(AActor, A_KoraxDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (pr_koraxdecide()<220) { @@ -222,7 +222,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KoraxDecide) DEFINE_ACTION_FUNCTION(AActor, A_KoraxMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); static const struct { const char *type, *sound; } choices[6] = { @@ -265,7 +265,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KoraxMissile) DEFINE_ACTION_FUNCTION(AActor, A_KoraxCommand) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle ang; int numcommands; @@ -399,7 +399,7 @@ static void A_KSpiritSeeker (AActor *actor, DAngle thresh, DAngle turnMax) DEFINE_ACTION_FUNCTION(AActor, A_KSpiritRoam) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->health-- <= 0) { @@ -432,7 +432,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KSpiritRoam) DEFINE_ACTION_FUNCTION(AActor, A_KBolt) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // Countdown lifetime if (self->special1-- <= 0) @@ -450,7 +450,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KBolt) DEFINE_ACTION_FUNCTION(AActor, A_KBoltRaise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; diff --git a/src/g_hexen/a_magecone.cpp b/src/g_hexen/a_magecone.cpp index b33f93787..57e68c16f 100644 --- a/src/g_hexen/a_magecone.cpp +++ b/src/g_hexen/a_magecone.cpp @@ -51,7 +51,7 @@ int AFrostMissile::DoSpecialDamage (AActor *victim, int damage, FName damagetype DEFINE_ACTION_FUNCTION(AActor, A_FireConePL1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -112,7 +112,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireConePL1) DEFINE_ACTION_FUNCTION(AActor, A_ShedShard) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int spawndir = self->special1; diff --git a/src/g_hexen/a_magelightning.cpp b/src/g_hexen/a_magelightning.cpp index f322d88a6..e4390131a 100644 --- a/src/g_hexen/a_magelightning.cpp +++ b/src/g_hexen/a_magelightning.cpp @@ -126,7 +126,7 @@ int ALightningZap::SpecialMissileHit (AActor *thing) DEFINE_ACTION_FUNCTION(AActor, A_LightningReady) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DoReadyWeapon(self); if (pr_lightningready() < 160) @@ -144,7 +144,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LightningReady) DEFINE_ACTION_FUNCTION(AActor, A_LightningClip) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *cMo; AActor *target = NULL; @@ -211,7 +211,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LightningClip) DEFINE_ACTION_FUNCTION(AActor, A_LightningZap) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PClassActor *lightning = PClass::FindActor(self->GetClass()->MissileName); AActor *mo; @@ -257,7 +257,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LightningZap) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MLightningAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(floor, AActor) { floor = PClass::FindActor("LightningFloor"); } PARAM_CLASS_OPT(ceiling, AActor) { ceiling = PClass::FindActor("LightningCeiling"); } @@ -298,7 +298,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_MLightningAttack) DEFINE_ACTION_FUNCTION(AActor, A_ZapMimic) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -326,7 +326,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ZapMimic) DEFINE_ACTION_FUNCTION(AActor, A_LastZap) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PClassActor *lightning = PClass::FindActor(self->GetClass()->MissileName); AActor *mo; @@ -353,7 +353,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LastZap) DEFINE_ACTION_FUNCTION(AActor, A_LightningRemove) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; diff --git a/src/g_hexen/a_magestaff.cpp b/src/g_hexen/a_magestaff.cpp index ca846d794..710af8198 100644 --- a/src/g_hexen/a_magestaff.cpp +++ b/src/g_hexen/a_magestaff.cpp @@ -122,7 +122,7 @@ void MStaffSpawn (AActor *pmo, DAngle angle, AActor *alttarget) DEFINE_ACTION_FUNCTION(AActor, A_MStaffAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; player_t *player; @@ -167,7 +167,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MStaffAttack) DEFINE_ACTION_FUNCTION(AActor, A_MStaffPalette) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -188,7 +188,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MStaffPalette) DEFINE_ACTION_FUNCTION(AActor, A_MStaffTrack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if ((self->tracer == 0) && (pr_mstafftrack()<50)) { @@ -250,7 +250,7 @@ void MStaffSpawn2 (AActor *actor, DAngle angle) DEFINE_ACTION_FUNCTION(AActor, A_MageAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) { diff --git a/src/g_hexen/a_pig.cpp b/src/g_hexen/a_pig.cpp index 11bfe3ce8..cafcbcda3 100644 --- a/src/g_hexen/a_pig.cpp +++ b/src/g_hexen/a_pig.cpp @@ -58,7 +58,7 @@ void APigPlayer::MorphPlayerThink () DEFINE_ACTION_FUNCTION(AActor, A_SnoutAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -96,7 +96,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SnoutAttack) DEFINE_ACTION_FUNCTION(AActor, A_PigPain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_Pain, self); if (self->Z() <= self->floorz) diff --git a/src/g_hexen/a_serpent.cpp b/src/g_hexen/a_serpent.cpp index 1f6d1dd2b..6f435747e 100644 --- a/src/g_hexen/a_serpent.cpp +++ b/src/g_hexen/a_serpent.cpp @@ -25,7 +25,7 @@ static FRandom pr_delaygib ("DelayGib"); DEFINE_ACTION_FUNCTION(AActor, A_SerpentUnHide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; self->Floorclip = 24; @@ -40,7 +40,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentUnHide) DEFINE_ACTION_FUNCTION(AActor, A_SerpentHide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags |= RF_INVISIBLE; self->Floorclip = 0; @@ -56,7 +56,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentHide) DEFINE_ACTION_FUNCTION(AActor, A_SerpentRaiseHump) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Floorclip -= 4; return 0; @@ -70,7 +70,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentRaiseHump) DEFINE_ACTION_FUNCTION(AActor, A_SerpentLowerHump) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Floorclip += 4; return 0; @@ -86,7 +86,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentLowerHump) DEFINE_ACTION_FUNCTION(AActor, A_SerpentHumpDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->MissileState != NULL) { @@ -127,7 +127,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentHumpDecide) DEFINE_ACTION_FUNCTION(AActor, A_SerpentCheckForAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) { @@ -167,7 +167,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentCheckForAttack) DEFINE_ACTION_FUNCTION(AActor, A_SerpentChooseAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target || self->CheckMeleeRange()) { @@ -188,7 +188,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentChooseAttack) DEFINE_ACTION_FUNCTION(AActor, A_SerpentMeleeAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) { @@ -216,7 +216,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentMeleeAttack) DEFINE_ACTION_FUNCTION(AActor, A_SerpentSpawnGibs) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; static const char *GibTypes[] = @@ -250,7 +250,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SerpentSpawnGibs) DEFINE_ACTION_FUNCTION(AActor, A_FloatGib) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Floorclip -= 1; return 0; @@ -264,7 +264,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FloatGib) DEFINE_ACTION_FUNCTION(AActor, A_SinkGib) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Floorclip += 1;; return 0; @@ -278,7 +278,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SinkGib) DEFINE_ACTION_FUNCTION(AActor, A_DelayGib) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->tics -= pr_delaygib()>>2; return 0; @@ -292,7 +292,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DelayGib) DEFINE_ACTION_FUNCTION(AActor, A_SerpentHeadCheck) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->Z() <= self->floorz) { diff --git a/src/g_hexen/a_spike.cpp b/src/g_hexen/a_spike.cpp index 1e81f568f..3f5f4d2e8 100644 --- a/src/g_hexen/a_spike.cpp +++ b/src/g_hexen/a_spike.cpp @@ -79,7 +79,7 @@ void AThrustFloor::Deactivate (AActor *activator) DEFINE_ACTION_FUNCTION(AActor, A_ThrustInitUp) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special2 = 5; // Raise speed self->args[0] = 1; // Mark as up @@ -92,7 +92,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ThrustInitUp) DEFINE_ACTION_FUNCTION(AActor, A_ThrustInitDn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->special2 = 5; // Raise speed self->args[0] = 0; // Mark as down @@ -108,7 +108,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ThrustInitDn) DEFINE_ACTION_FUNCTION(AActor, A_ThrustRaise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AThrustFloor *actor = static_cast(self); @@ -137,7 +137,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ThrustRaise) DEFINE_ACTION_FUNCTION(AActor, A_ThrustLower) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (A_SinkMobj (self, 6)) { @@ -152,7 +152,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ThrustLower) DEFINE_ACTION_FUNCTION(AActor, A_ThrustImpale) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // This doesn't need to iterate through portals. diff --git a/src/g_hexen/a_summon.cpp b/src/g_hexen/a_summon.cpp index c9daad6ec..e1b2bae09 100644 --- a/src/g_hexen/a_summon.cpp +++ b/src/g_hexen/a_summon.cpp @@ -49,7 +49,7 @@ bool AArtiDarkServant::Use (bool pickup) DEFINE_ACTION_FUNCTION(AActor, A_Summon) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AMinotaurFriend *mo; diff --git a/src/g_hexen/a_teleportother.cpp b/src/g_hexen/a_teleportother.cpp index a89e62b4b..99d6876a5 100644 --- a/src/g_hexen/a_teleportother.cpp +++ b/src/g_hexen/a_teleportother.cpp @@ -63,35 +63,35 @@ static void TeloSpawn (AActor *source, const char *type) DEFINE_ACTION_FUNCTION(AActor, A_TeloSpawnA) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TeloSpawn (self, "TelOtherFX2"); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_TeloSpawnB) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TeloSpawn (self, "TelOtherFX3"); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_TeloSpawnC) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TeloSpawn (self, "TelOtherFX4"); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_TeloSpawnD) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TeloSpawn (self, "TelOtherFX5"); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_CheckTeleRing) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->special1-- <= 0) { diff --git a/src/g_hexen/a_wraith.cpp b/src/g_hexen/a_wraith.cpp index f5c1f44f4..fcd0d75f3 100644 --- a/src/g_hexen/a_wraith.cpp +++ b/src/g_hexen/a_wraith.cpp @@ -23,7 +23,7 @@ static FRandom pr_wraithfx4 ("WraithFX4"); DEFINE_ACTION_FUNCTION(AActor, A_WraithInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->AddZ(48); @@ -45,7 +45,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithInit) DEFINE_ACTION_FUNCTION(AActor, A_WraithRaiseInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; self->flags2 &= ~MF2_NONSHOOTABLE; @@ -63,7 +63,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithRaiseInit) DEFINE_ACTION_FUNCTION(AActor, A_WraithRaise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (A_RaiseMobj (self, 2)) { @@ -88,7 +88,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithRaise) DEFINE_ACTION_FUNCTION(AActor, A_WraithMelee) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int amount; @@ -110,7 +110,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithMelee) DEFINE_ACTION_FUNCTION(AActor, A_WraithFX2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; DAngle angle; @@ -147,7 +147,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WraithFX2) DEFINE_ACTION_FUNCTION(AActor, A_WraithFX3) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; int numdropped = pr_wraithfx3() % 15; @@ -242,7 +242,7 @@ void A_WraithFX4 (AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_WraithChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int weaveindex = self->WeaveIndexZ; self->AddZ(BobSin(weaveindex)); diff --git a/src/g_raven/a_minotaur.cpp b/src/g_raven/a_minotaur.cpp index e3636fe1b..8bdbe122b 100644 --- a/src/g_raven/a_minotaur.cpp +++ b/src/g_raven/a_minotaur.cpp @@ -135,7 +135,7 @@ bool AMinotaurFriend::OkayToSwitchTarget (AActor *other) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (Wads.CheckNumForName ("MNTRF1", ns_sprites) < 0 && Wads.CheckNumForName ("MNTRF0", ns_sprites) < 0) @@ -145,7 +145,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurDeath) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player; @@ -180,7 +180,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk1) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); bool friendly = !!(self->flags5 & MF5_SUMMONEDMONSTER); AActor *target; @@ -237,7 +237,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurDecide) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurCharge) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *puff; @@ -280,7 +280,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurCharge) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; DAngle angle; @@ -330,7 +330,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk2) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk3) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; player_t *player; @@ -386,7 +386,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurAtk3) DEFINE_ACTION_FUNCTION(AActor, A_MntrFloorFire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *mo; @@ -443,7 +443,7 @@ void P_MinotaurSlam (AActor *source, AActor *target) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // In case pain caused him to skip his fade in. self->RenderStyle = STYLE_Normal; @@ -491,7 +491,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurLook) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->IsKindOf(RUNTIME_CLASS(AMinotaurFriend))) { @@ -562,7 +562,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurLook) DEFINE_ACTION_FUNCTION(AActor, A_MinotaurChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->IsKindOf(RUNTIME_CLASS(AMinotaurFriend))) { diff --git a/src/g_shared/a_action.cpp b/src/g_shared/a_action.cpp index 3b1191131..abd58dec1 100644 --- a/src/g_shared/a_action.cpp +++ b/src/g_shared/a_action.cpp @@ -104,14 +104,14 @@ void A_Unblock(AActor *self, bool drop) DEFINE_ACTION_FUNCTION(AActor, A_NoBlocking) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_Unblock(self, true); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_Fall) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_Unblock(self, true); return 0; } @@ -124,7 +124,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Fall) DEFINE_ACTION_FUNCTION(AActor, A_SetFloorClip) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 |= MF2_FLOORCLIP; self->AdjustFloorClip (); @@ -139,7 +139,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetFloorClip) DEFINE_ACTION_FUNCTION(AActor, A_UnSetFloorClip) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 &= ~MF2_FLOORCLIP; self->Floorclip = 0; @@ -154,7 +154,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnSetFloorClip) DEFINE_ACTION_FUNCTION(AActor, A_HideThing) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags |= RF_INVISIBLE; return 0; @@ -168,7 +168,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HideThing) DEFINE_ACTION_FUNCTION(AActor, A_UnHideThing) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; return 0; @@ -182,7 +182,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnHideThing) DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int t = pr_freezedeath(); self->tics = 75+t+pr_freezedeath(); @@ -228,7 +228,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeath) DEFINE_ACTION_FUNCTION(AActor, A_GenericFreezeDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Translation = TRANSLATION(TRANSLATION_Standard, 7); CALL_ACTION(A_FreezeDeath, self); @@ -243,7 +243,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_GenericFreezeDeath) DEFINE_ACTION_FUNCTION(AActor, A_IceSetTics) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int floor; @@ -268,7 +268,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_IceSetTics) DEFINE_ACTION_FUNCTION(AActor, A_FreezeDeathChunks) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; int numChunks; @@ -446,7 +446,7 @@ void DCorpsePointer::Serialize(FSerializer &arc) // throw another corpse on the queue DEFINE_ACTION_FUNCTION(AActor, A_QueueCorpse) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (sv_corpsequeuesize > 0) { @@ -458,7 +458,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_QueueCorpse) // Remove an self from the queue (for resurrection) DEFINE_ACTION_FUNCTION(AActor, A_DeQueueCorpse) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TThinkerIterator iterator (STAT_CORPSEPOINTER); DCorpsePointer *corpsePtr; @@ -483,7 +483,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DeQueueCorpse) DEFINE_ACTION_FUNCTION(AActor, A_SetInvulnerable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 |= MF2_INVULNERABLE; return 0; @@ -497,7 +497,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetInvulnerable) DEFINE_ACTION_FUNCTION(AActor, A_UnSetInvulnerable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 &= ~MF2_INVULNERABLE; return 0; @@ -511,7 +511,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnSetInvulnerable) DEFINE_ACTION_FUNCTION(AActor, A_SetReflective) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 |= MF2_REFLECTIVE; return 0; @@ -525,7 +525,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetReflective) DEFINE_ACTION_FUNCTION(AActor, A_UnSetReflective) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 &= ~MF2_REFLECTIVE; return 0; @@ -539,7 +539,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnSetReflective) DEFINE_ACTION_FUNCTION(AActor, A_SetReflectiveInvulnerable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 |= MF2_REFLECTIVE|MF2_INVULNERABLE; return 0; @@ -553,7 +553,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetReflectiveInvulnerable) DEFINE_ACTION_FUNCTION(AActor, A_UnSetReflectiveInvulnerable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 &= ~(MF2_REFLECTIVE|MF2_INVULNERABLE); return 0; @@ -567,7 +567,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnSetReflectiveInvulnerable) DEFINE_ACTION_FUNCTION(AActor, A_SetShootable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 &= ~MF2_NONSHOOTABLE; self->flags |= MF_SHOOTABLE; @@ -582,7 +582,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetShootable) DEFINE_ACTION_FUNCTION(AActor, A_UnSetShootable) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags2 |= MF2_NONSHOOTABLE; self->flags &= ~MF_SHOOTABLE; @@ -597,7 +597,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_UnSetShootable) DEFINE_ACTION_FUNCTION(AActor, A_NoGravity) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_NOGRAVITY; return 0; @@ -611,7 +611,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_NoGravity) DEFINE_ACTION_FUNCTION(AActor, A_Gravity) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_NOGRAVITY; self->Gravity = 1; @@ -626,7 +626,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Gravity) DEFINE_ACTION_FUNCTION(AActor, A_LowGravity) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_NOGRAVITY; self->Gravity = 1. / 8;; diff --git a/src/g_shared/a_bridge.cpp b/src/g_shared/a_bridge.cpp index 3161c2a45..f3b12a1d1 100644 --- a/src/g_shared/a_bridge.cpp +++ b/src/g_shared/a_bridge.cpp @@ -92,7 +92,7 @@ void ACustomBridge::Destroy() DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) { // Don't crash if somebody spawned this into the world @@ -121,7 +121,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BridgeOrbit) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BridgeInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(balltype, AActor) { balltype = NULL; } AActor *ball; diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index 38f0a5130..ae7516d17 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -355,7 +355,7 @@ bool P_GiveBody (AActor *actor, int num, int max) DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialThing1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; if (static_cast(self)->DoRespawn ()) @@ -373,7 +373,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialThing1) DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialThing2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_SPECIAL; if (!(self->GetDefault()->flags & MF_NOGRAVITY)) @@ -393,7 +393,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialThing2) DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialDoomThing) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->renderflags &= ~RF_INVISIBLE; self->flags |= MF_SPECIAL; @@ -418,7 +418,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialDoomThing) DEFINE_ACTION_FUNCTION(AActor, A_RestoreSpecialPosition) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // Move item back to its original location DVector2 sp = self->SpawnPoint; diff --git a/src/g_shared/a_specialspot.cpp b/src/g_shared/a_specialspot.cpp index 48a8ce1a1..1af9f6db7 100644 --- a/src/g_shared/a_specialspot.cpp +++ b/src/g_shared/a_specialspot.cpp @@ -380,7 +380,7 @@ void ASpecialSpot::Destroy() DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnSingleItem) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS (cls, AActor); PARAM_INT_OPT (fail_sp) { fail_sp = 0; } PARAM_INT_OPT (fail_co) { fail_co = 0; } diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 84305b9cd..d7f432a7a 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -1922,7 +1922,7 @@ PClassWeapon *Net_ReadWeapon(BYTE **stream) DEFINE_ACTION_FUNCTION_PARAMS(AWeapon, A_ZoomFactor) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT (zoom) { zoom = 1; } PARAM_INT_OPT (flags) { flags = 0; } @@ -1950,7 +1950,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AWeapon, A_ZoomFactor) DEFINE_ACTION_FUNCTION_PARAMS(AWeapon, A_SetCrosshair) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT(xhair); if (self->player != NULL && self->player->ReadyWeapon != NULL) diff --git a/src/g_strife/a_acolyte.cpp b/src/g_strife/a_acolyte.cpp index 6f08a84c8..a21c06619 100644 --- a/src/g_strife/a_acolyte.cpp +++ b/src/g_strife/a_acolyte.cpp @@ -27,7 +27,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HideDecepticon) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); EV_DoDoor (DDoor::doorClose, NULL, self, 999, 8., 0, 0, 0); if (self->target != NULL && self->target->player != NULL) @@ -45,7 +45,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_HideDecepticon) DEFINE_ACTION_FUNCTION(AActor, A_AcolyteDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; @@ -92,7 +92,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_AcolyteDie) DEFINE_ACTION_FUNCTION(AActor, A_BeShadowyFoe) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->RenderStyle = STYLE_Translucent; self->Alpha = HR_SHADOW; @@ -108,7 +108,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BeShadowyFoe) DEFINE_ACTION_FUNCTION(AActor, A_AcolyteBits) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->SpawnFlags & MTF_SHADOW) { diff --git a/src/g_strife/a_alienspectres.cpp b/src/g_strife/a_alienspectres.cpp index d4103015c..a1c20355f 100644 --- a/src/g_strife/a_alienspectres.cpp +++ b/src/g_strife/a_alienspectres.cpp @@ -20,7 +20,7 @@ static FRandom pr_spectrechunk ("212e4"); DEFINE_ACTION_FUNCTION(AActor, A_SpectreChunkSmall) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo = Spawn("AlienChunkSmall", self->PosPlusZ(10.), ALLOW_REPLACE); @@ -41,7 +41,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpectreChunkSmall) DEFINE_ACTION_FUNCTION(AActor, A_SpectreChunkLarge) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo = Spawn("AlienChunkLarge", self->PosPlusZ(10.), ALLOW_REPLACE); @@ -62,7 +62,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpectreChunkLarge) DEFINE_ACTION_FUNCTION(AActor, A_Spectre3Attack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -86,7 +86,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Spectre3Attack) DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *player; char voc[32]; diff --git a/src/g_strife/a_crusader.cpp b/src/g_strife/a_crusader.cpp index 8e340b820..05835a5f9 100644 --- a/src/g_strife/a_crusader.cpp +++ b/src/g_strife/a_crusader.cpp @@ -20,7 +20,7 @@ static bool CrusaderCheckRange (AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_CrusaderChoose) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -51,7 +51,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrusaderChoose) DEFINE_ACTION_FUNCTION(AActor, A_CrusaderSweepLeft) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Angles.Yaw += 90./16; AActor *misl = P_SpawnMissileZAimed (self, self->Z() + 48, self->target, PClass::FindActor("FastFlameMissile")); @@ -64,7 +64,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrusaderSweepLeft) DEFINE_ACTION_FUNCTION(AActor, A_CrusaderSweepRight) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Angles.Yaw -= 90./16; AActor *misl = P_SpawnMissileZAimed (self, self->Z() + 48, self->target, PClass::FindActor("FastFlameMissile")); @@ -77,7 +77,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrusaderSweepRight) DEFINE_ACTION_FUNCTION(AActor, A_CrusaderRefire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL || self->target->health <= 0 || @@ -90,7 +90,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrusaderRefire) DEFINE_ACTION_FUNCTION(AActor, A_CrusaderDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (CheckBossDeath (self)) { diff --git a/src/g_strife/a_entityboss.cpp b/src/g_strife/a_entityboss.cpp index b7f60e26f..84a4b3fa3 100644 --- a/src/g_strife/a_entityboss.cpp +++ b/src/g_strife/a_entityboss.cpp @@ -14,7 +14,7 @@ static FRandom pr_entity ("Entity"); DEFINE_ACTION_FUNCTION(AActor, A_SubEntityDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (CheckBossDeath (self)) { @@ -42,7 +42,7 @@ DECLARE_ACTION(A_Spectre3Attack) DEFINE_ACTION_FUNCTION(AActor, A_EntityAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // Apparent Strife bug: Case 5 was unreachable because they used % 5 instead of % 6. // I've fixed that by making case 1 duplicate it, since case 1 did nothing. @@ -75,7 +75,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_EntityAttack) DEFINE_ACTION_FUNCTION(AActor, A_SpawnEntity) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *entity = Spawn("EntityBoss", self->PosPlusZ(70.), ALLOW_REPLACE); if (entity != NULL) @@ -90,7 +90,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnEntity) DEFINE_ACTION_FUNCTION(AActor, A_EntityDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *second; double secondRadius = GetDefaultByName("EntitySecond")->radius * 2; diff --git a/src/g_strife/a_inquisitor.cpp b/src/g_strife/a_inquisitor.cpp index 16871300a..a4c2d72f4 100644 --- a/src/g_strife/a_inquisitor.cpp +++ b/src/g_strife/a_inquisitor.cpp @@ -12,7 +12,7 @@ static FRandom pr_inq ("Inquisitor"); DEFINE_ACTION_FUNCTION(AActor, A_InquisitorWalk) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "inquisitor/walk", 1, ATTN_NORM); A_Chase (stack, self); @@ -30,7 +30,7 @@ bool InquisitorCheckDistance (AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_InquisitorDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target == NULL) return 0; @@ -52,7 +52,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_InquisitorDecide) DEFINE_ACTION_FUNCTION(AActor, A_InquisitorAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *proj; @@ -80,7 +80,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_InquisitorAttack) DEFINE_ACTION_FUNCTION(AActor, A_InquisitorJump) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double dist; double speed; @@ -102,7 +102,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_InquisitorJump) DEFINE_ACTION_FUNCTION(AActor, A_InquisitorCheckLand) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->reactiontime--; if (self->reactiontime < 0 || @@ -125,7 +125,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_InquisitorCheckLand) DEFINE_ACTION_FUNCTION(AActor, A_TossArm) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo = Spawn("InquisitorArm", self->PosPlusZ(24.), ALLOW_REPLACE); foo->Angles.Yaw = self->Angles.Yaw - 90. + pr_inq.Random2() * (360./1024.); diff --git a/src/g_strife/a_loremaster.cpp b/src/g_strife/a_loremaster.cpp index 2d695ac8d..504324590 100644 --- a/src/g_strife/a_loremaster.cpp +++ b/src/g_strife/a_loremaster.cpp @@ -33,7 +33,7 @@ int ALoreShot::DoSpecialDamage (AActor *victim, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_LoremasterChain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "loremaster/active", 1, ATTN_NORM); Spawn("LoreShot2", self->Pos(), ALLOW_REPLACE); diff --git a/src/g_strife/a_oracle.cpp b/src/g_strife/a_oracle.cpp index 139786d89..f49849922 100644 --- a/src/g_strife/a_oracle.cpp +++ b/src/g_strife/a_oracle.cpp @@ -10,7 +10,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); TThinkerIterator it(NAME_AlienSpectre3); AActor *spectre = it.Next(); diff --git a/src/g_strife/a_programmer.cpp b/src/g_strife/a_programmer.cpp index 9c8cb6be3..b46b47e70 100644 --- a/src/g_strife/a_programmer.cpp +++ b/src/g_strife/a_programmer.cpp @@ -74,7 +74,7 @@ PalEntry AProgLevelEnder::GetBlend () DEFINE_ACTION_FUNCTION(AActor, A_ProgrammerMelee) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage; @@ -102,7 +102,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ProgrammerMelee) DEFINE_ACTION_FUNCTION(AActor, A_SpotLightning) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *spot; @@ -128,7 +128,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpotLightning) DEFINE_ACTION_FUNCTION(AActor, A_SpawnProgrammerBase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo = Spawn("ProgrammerBase", self->PosPlusZ(24.), ALLOW_REPLACE); if (foo != NULL) @@ -148,7 +148,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpawnProgrammerBase) DEFINE_ACTION_FUNCTION(AActor, A_ProgrammerDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!CheckBossDeath (self)) return 0; diff --git a/src/g_strife/a_reaver.cpp b/src/g_strife/a_reaver.cpp index 09d771a19..9c6e9f6b9 100644 --- a/src/g_strife/a_reaver.cpp +++ b/src/g_strife/a_reaver.cpp @@ -13,7 +13,7 @@ static FRandom pr_reaverattack ("ReaverAttack"); DEFINE_ACTION_FUNCTION(AActor, A_ReaverRanged) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target != NULL) { diff --git a/src/g_strife/a_rebels.cpp b/src/g_strife/a_rebels.cpp index c4df1cba1..e460dd91a 100644 --- a/src/g_strife/a_rebels.cpp +++ b/src/g_strife/a_rebels.cpp @@ -22,7 +22,7 @@ static FRandom pr_shootgun ("ShootGun"); DEFINE_ACTION_FUNCTION(AActor, A_ShootGun) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle pitch; @@ -74,7 +74,7 @@ bool ATeleporterBeacon::Use (bool pickup) DEFINE_ACTION_FUNCTION(AActor, A_Beacon) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *owner = self->target; AActor *rebel; diff --git a/src/g_strife/a_sentinel.cpp b/src/g_strife/a_sentinel.cpp index 42a7aeb47..44946c84a 100644 --- a/src/g_strife/a_sentinel.cpp +++ b/src/g_strife/a_sentinel.cpp @@ -11,7 +11,7 @@ static FRandom pr_sentinelrefire ("SentinelRefire"); DEFINE_ACTION_FUNCTION(AActor, A_SentinelBob) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double minz, maxz; @@ -43,7 +43,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SentinelBob) DEFINE_ACTION_FUNCTION(AActor, A_SentinelAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *missile, *trail; @@ -75,7 +75,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SentinelAttack) DEFINE_ACTION_FUNCTION(AActor, A_SentinelRefire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_FaceTarget (self); diff --git a/src/g_strife/a_spectral.cpp b/src/g_strife/a_spectral.cpp index 1b1f13b1a..b348e54dc 100644 --- a/src/g_strife/a_spectral.cpp +++ b/src/g_strife/a_spectral.cpp @@ -26,7 +26,7 @@ void ASpectralMonster::Touch (AActor *toucher) DEFINE_ACTION_FUNCTION(AActor, A_SpectralLightningTail) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo = Spawn("SpectralLightningHTail", self->Vec3Offset(-self->Vel.X, -self->Vel.Y, 0.), ALLOW_REPLACE); @@ -37,7 +37,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpectralLightningTail) DEFINE_ACTION_FUNCTION(AActor, A_SpectralBigBallLightning) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PClassActor *cls = PClass::FindActor("SpectralLightningH3"); if (cls) @@ -56,7 +56,7 @@ static FRandom pr_zap5 ("Zap5"); DEFINE_ACTION_FUNCTION(AActor, A_SpectralLightning) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *flash; @@ -90,7 +90,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpectralLightning) DEFINE_ACTION_FUNCTION(AActor, A_Tracer2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *dest; double dist; diff --git a/src/g_strife/a_stalker.cpp b/src/g_strife/a_stalker.cpp index 210bd8c22..9189ef8de 100644 --- a/src/g_strife/a_stalker.cpp +++ b/src/g_strife/a_stalker.cpp @@ -13,7 +13,7 @@ static FRandom pr_stalker ("Stalker"); DEFINE_ACTION_FUNCTION(AActor, A_StalkerChaseDecide) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!(self->flags & MF_NOGRAVITY)) { @@ -28,7 +28,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_StalkerChaseDecide) DEFINE_ACTION_FUNCTION(AActor, A_StalkerLookInit) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); FState *state; if (self->flags & MF_NOGRAVITY) @@ -48,7 +48,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_StalkerLookInit) DEFINE_ACTION_FUNCTION(AActor, A_StalkerDrop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags5 &= ~MF5_NOVERTICALMELEERANGE; self->flags &= ~MF_NOGRAVITY; @@ -57,7 +57,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_StalkerDrop) DEFINE_ACTION_FUNCTION(AActor, A_StalkerAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->flags & MF_NOGRAVITY) { @@ -79,7 +79,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_StalkerAttack) DEFINE_ACTION_FUNCTION(AActor, A_StalkerWalk) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_BODY, "stalker/walk", 1, ATTN_NORM); A_Chase (stack, self); diff --git a/src/g_strife/a_strifeitems.cpp b/src/g_strife/a_strifeitems.cpp index 20de58d4f..6cda8a0fc 100644 --- a/src/g_strife/a_strifeitems.cpp +++ b/src/g_strife/a_strifeitems.cpp @@ -23,7 +23,7 @@ IMPLEMENT_CLASS(ADegninOre) DEFINE_ACTION_FUNCTION(AActor, A_RemoveForceField) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_SPECIAL; diff --git a/src/g_strife/a_strifestuff.cpp b/src/g_strife/a_strifestuff.cpp index 32ce0e395..ef60b77e7 100644 --- a/src/g_strife/a_strifestuff.cpp +++ b/src/g_strife/a_strifestuff.cpp @@ -87,7 +87,7 @@ int AForceFieldGuard::TakeSpecialDamage (AActor *inflictor, AActor *source, int DEFINE_ACTION_FUNCTION(AActor, A_SetShadow) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_STRIFEx8000000|MF_SHADOW; self->RenderStyle = STYLE_Translucent; @@ -97,7 +97,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SetShadow) DEFINE_ACTION_FUNCTION(AActor, A_ClearShadow) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~(MF_STRIFEx8000000|MF_SHADOW); self->RenderStyle = STYLE_Normal; @@ -109,7 +109,7 @@ static FRandom pr_gethurt ("HurtMe!"); DEFINE_ACTION_FUNCTION(AActor, A_GetHurt) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags4 |= MF4_INCOMBAT; if ((pr_gethurt() % 5) == 0) @@ -128,7 +128,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_GetHurt) DEFINE_ACTION_FUNCTION(AActor, A_TurretLook) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *target; @@ -160,7 +160,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_TurretLook) DEFINE_ACTION_FUNCTION(AActor, A_KlaxonBlare) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (--self->reactiontime < 0) { @@ -249,7 +249,7 @@ IMPLEMENT_CLASS (AMeat) DEFINE_ACTION_FUNCTION(AActor, A_TossGib) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); const char *gibtype = (self->flags & MF_NOBLOOD) ? "Junk" : "Meat"; AActor *gib = Spawn (gibtype, self->PosPlusZ(24.), ALLOW_REPLACE); @@ -269,7 +269,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_TossGib) DEFINE_ACTION_FUNCTION(AActor, A_FLoopActiveSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->ActiveSound != 0 && !(level.time & 7)) { @@ -280,7 +280,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FLoopActiveSound) DEFINE_ACTION_FUNCTION(AActor, A_Countdown) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (--self->reactiontime <= 0) { @@ -292,7 +292,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Countdown) DEFINE_ACTION_FUNCTION(AActor, A_LoopActiveSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->ActiveSound != 0 && !S_IsActorPlayingSomething (self, CHAN_VOICE, -1)) { @@ -303,7 +303,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LoopActiveSound) DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); sector_t *sec = self->Sector; @@ -332,7 +332,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain) DEFINE_ACTION_FUNCTION(AActor, A_ClearSoundTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *actor; @@ -347,7 +347,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ClearSoundTarget) DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_VOICE, "human/imonfire", 1, ATTN_NORM); @@ -365,7 +365,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ItBurnsItBurns) DEFINE_ACTION_FUNCTION(AActor, A_DropFire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *drop = Spawn("FireDroplet", self->PosPlusZ(24.), ALLOW_REPLACE); drop->Vel.Z = -1.; @@ -375,7 +375,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DropFire) DEFINE_ACTION_FUNCTION(AActor, A_CrispyPlayer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != nullptr && self->player->mo == self) { @@ -401,7 +401,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CrispyPlayer) DEFINE_ACTION_FUNCTION(AActor, A_HandLower) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != nullptr) { diff --git a/src/g_strife/a_strifeweapons.cpp b/src/g_strife/a_strifeweapons.cpp index 66d635aa5..91f4ac75e 100644 --- a/src/g_strife/a_strifeweapons.cpp +++ b/src/g_strife/a_strifeweapons.cpp @@ -94,7 +94,7 @@ void P_DaggerAlert (AActor *target, AActor *emitter) DEFINE_ACTION_FUNCTION(AActor, A_JabDagger) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DAngle angle; int damage; @@ -146,7 +146,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_AlertMonsters) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(maxdist) { maxdist = 0; } PARAM_INT_OPT(Flags) { Flags = 0; } @@ -212,7 +212,7 @@ int APoisonBolt::DoSpecialDamage (AActor *target, int damage, FName damagetype) DEFINE_ACTION_FUNCTION(AActor, A_ClearFlash) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; @@ -231,7 +231,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ClearFlash) DEFINE_ACTION_FUNCTION(AActor, A_ShowElectricFlash) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != nullptr) { @@ -248,7 +248,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ShowElectricFlash) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireArrow) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS(ti, AActor); DAngle savedangle; @@ -307,7 +307,7 @@ void P_StrifeGunShot (AActor *mo, bool accurate, DAngle pitch) DEFINE_ACTION_FUNCTION(AActor, A_FireAssaultGun) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); bool accurate; @@ -343,7 +343,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireAssaultGun) DEFINE_ACTION_FUNCTION(AActor, A_FireMiniMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; DAngle savedangle; @@ -374,7 +374,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMiniMissile) DEFINE_ACTION_FUNCTION(AActor, A_RocketInFlight) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *trail; @@ -398,7 +398,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RocketInFlight) DEFINE_ACTION_FUNCTION(AActor, A_FlameDie) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_NOGRAVITY; self->Vel.Z = pr_flamedie() & 3; @@ -413,7 +413,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FlameDie) DEFINE_ACTION_FUNCTION(AActor, A_FireFlamer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; @@ -450,7 +450,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireFlamer) DEFINE_ACTION_FUNCTION(AActor, A_FireMauler1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -494,7 +494,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMauler1) DEFINE_ACTION_FUNCTION(AActor, A_FireMauler2Pre) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/mauler2charge", 1, ATTN_NORM); @@ -516,7 +516,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMauler2Pre) DEFINE_ACTION_FUNCTION(AActor, A_FireMauler2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -544,7 +544,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireMauler2) DEFINE_ACTION_FUNCTION(AActor, A_MaulerTorpedoWave) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *wavedef = GetDefaultByName("MaulerTorpedoWave"); double savedz; @@ -620,7 +620,7 @@ int APhosphorousFire::DoSpecialDamage (AActor *target, int damage, FName damaget DEFINE_ACTION_FUNCTION(AActor, A_BurnArea) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); P_RadiusAttack (self, self->target, 128, 128, self->DamageType, RADF_HURTSOURCE); return 0; @@ -628,7 +628,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BurnArea) DEFINE_ACTION_FUNCTION(AActor, A_Burnination) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Vel.Z -= 8; self->Vel.X += (pr_phburn.Random2 (3)); @@ -688,7 +688,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Burnination) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireGrenade) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS(grenadetype, AActor); PARAM_ANGLE(angleofs); PARAM_STATE(flash) @@ -821,7 +821,7 @@ AInventory *ASigil::CreateCopy (AActor *other) DEFINE_ACTION_FUNCTION(AActor, A_SelectPiece) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int pieces = MIN (static_cast(self)->NumPieces, 5); @@ -847,7 +847,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SelectPiece) DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilView) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DPSprite *pspr; int pieces; @@ -874,7 +874,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilView) DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilDown) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DPSprite *pspr; int pieces; @@ -904,7 +904,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilDown) DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); DPSprite *pspr; int pieces; @@ -927,7 +927,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SelectSigilAttack) DEFINE_ACTION_FUNCTION(AActor, A_SigilCharge) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); S_Sound (self, CHAN_WEAPON, "weapons/sigilcharge", 1, ATTN_NORM); if (self->player != NULL) @@ -945,7 +945,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SigilCharge) DEFINE_ACTION_FUNCTION(AActor, A_LightInverse) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -962,7 +962,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LightInverse) DEFINE_ACTION_FUNCTION(AActor, A_FireSigil1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *spot; player_t *player = self->player; @@ -1007,7 +1007,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil1) DEFINE_ACTION_FUNCTION(AActor, A_FireSigil2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; @@ -1029,7 +1029,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil2) DEFINE_ACTION_FUNCTION(AActor, A_FireSigil3) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *spot; player_t *player = self->player; @@ -1063,7 +1063,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil3) DEFINE_ACTION_FUNCTION(AActor, A_FireSigil4) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *spot; player_t *player = self->player; @@ -1103,7 +1103,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireSigil4) DEFINE_ACTION_FUNCTION(AActor, A_FireSigil5) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; diff --git a/src/g_strife/a_templar.cpp b/src/g_strife/a_templar.cpp index 5ca2ef862..0bfa00b24 100644 --- a/src/g_strife/a_templar.cpp +++ b/src/g_strife/a_templar.cpp @@ -13,7 +13,7 @@ static FRandom pr_templar ("Templar"); DEFINE_ACTION_FUNCTION(AActor, A_TemplarAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage; DAngle angle; diff --git a/src/g_strife/a_thingstoblowup.cpp b/src/g_strife/a_thingstoblowup.cpp index 6d1294b53..5e1bc42d2 100644 --- a/src/g_strife/a_thingstoblowup.cpp +++ b/src/g_strife/a_thingstoblowup.cpp @@ -16,7 +16,7 @@ static FRandom pr_lightout ("LightOut"); DEFINE_ACTION_FUNCTION(AActor, A_Bang4Cloud) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); double xo = (pr_bang4cloud.Random2() & 3) * (10. / 64); double yo = (pr_bang4cloud.Random2() & 3) * (10. / 64); @@ -63,7 +63,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveQuestItem) DEFINE_ACTION_FUNCTION(AActor, A_ExtraLightOff) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->target != NULL && self->target->player != NULL) { @@ -74,7 +74,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ExtraLightOff) DEFINE_ACTION_FUNCTION(AActor, A_Explode512) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); P_RadiusAttack (self, self->target, 512, 512, NAME_None, RADF_HURTSOURCE); if (self->target != NULL && self->target->player != NULL) @@ -90,7 +90,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Explode512) DEFINE_ACTION_FUNCTION(AActor, A_LightGoesOut) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *foo; sector_t *sec = self->Sector; diff --git a/src/info.h b/src/info.h index 0fe479d20..5e1d045f2 100644 --- a/src/info.h +++ b/src/info.h @@ -360,14 +360,12 @@ void AddStateLight(FState *state, const char *lname); // self - Actor this action is to operate on (player if a weapon) // stateowner - Actor this action really belongs to (may be an item) // callingstate - State this action was called from -#define PARAM_ACTION_PROLOGUE_TYPE(type) \ +#define PARAM_ACTION_PROLOGUE(type) \ PARAM_PROLOGUE; \ PARAM_OBJECT (self, type); \ PARAM_OBJECT_OPT (stateowner, AActor) { stateowner = self; } \ PARAM_STATEINFO_OPT (stateinfo) { stateinfo = nullptr; } \ -#define PARAM_ACTION_PROLOGUE PARAM_ACTION_PROLOGUE_TYPE(AActor) - // Number of action paramaters #define NAP 3 diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index bbeeca374..f389cd1ee 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -891,7 +891,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_TransferPointer) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CopyFriendliness) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (ptr_source) { ptr_source = AAPTR_MASTER; } if (self->player != NULL) @@ -914,28 +914,28 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CopyFriendliness) //========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_SetSolid) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_SOLID; return 0; } DEFINE_ACTION_FUNCTION(AActor, A_UnsetSolid) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~MF_SOLID; return 0; } DEFINE_ACTION_FUNCTION(AActor, A_SetFloat) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags |= MF_FLOAT; return 0; } DEFINE_ACTION_FUNCTION(AActor, A_UnsetFloat) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->flags &= ~(MF_FLOAT|MF_INFLOAT); return 0; } @@ -980,7 +980,7 @@ static void DoAttack (AActor *self, bool domelee, bool domissile, DEFINE_ACTION_FUNCTION(AActor, A_MeleeAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int MeleeDamage = self->GetClass()->MeleeDamage; FSoundID MeleeSound = self->GetClass()->MeleeSound; DoAttack(self, true, false, MeleeDamage, MeleeSound, NULL, 0); @@ -989,7 +989,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MeleeAttack) DEFINE_ACTION_FUNCTION(AActor, A_MissileAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PClassActor *MissileType = PClass::FindActor(self->GetClass()->MissileName); DoAttack(self, false, true, 0, 0, MissileType, self->GetClass()->MissileHeight); return 0; @@ -997,7 +997,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MissileAttack) DEFINE_ACTION_FUNCTION(AActor, A_ComboAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int MeleeDamage = self->GetClass()->MeleeDamage; FSoundID MeleeSound = self->GetClass()->MeleeSound; PClassActor *MissileType = PClass::FindActor(self->GetClass()->MissileName); @@ -1028,7 +1028,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BasicAttack) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_SOUND_OPT (soundid) { soundid = "weapons/pistol"; } PARAM_INT_OPT (channel) { channel = CHAN_BODY; } PARAM_FLOAT_OPT (volume) { volume = 1; } @@ -1051,7 +1051,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PlaySound) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_StopSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(slot) { slot = CHAN_VOICE; } S_StopSound(self, slot); @@ -1167,7 +1167,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SeekerMissile) //========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_BulletAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int i; @@ -1415,7 +1415,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (damage) { damage = -1; } PARAM_INT_OPT (distance) { distance = -1; } PARAM_INT_OPT (flags) { flags = XF_HURTSOURCE; } @@ -1484,7 +1484,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusThrust) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (force) { force = 128; } PARAM_INT_OPT (distance) { distance = -1; } PARAM_INT_OPT (flags) { flags = RTF_AFFECTSOURCE; } @@ -1524,7 +1524,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RadiusDamageSelf) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(damage) { damage = 128; } PARAM_FLOAT_OPT(distance) { distance = 128; } PARAM_INT_OPT(flags) { flags = 0; } @@ -1859,7 +1859,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack) //========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomMeleeAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (damage) { damage = 0; } PARAM_SOUND_OPT (meleesound) { meleesound = 0; } PARAM_SOUND_OPT (misssound) { misssound = 0; } @@ -1946,7 +1946,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomComboAttack) //========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfNoAmmo) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_STATE(jump); if (!ACTION_CALL_FROM_PSPRITE() || self->player->ReadyWeapon == nullptr) @@ -2017,7 +2017,7 @@ static void AimBulletMissile(AActor *proj, AActor *puff, int flags, bool temp, b DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_ANGLE (spread_xy); PARAM_ANGLE (spread_z); PARAM_INT (numbullets); @@ -2147,7 +2147,7 @@ enum FP_Flags }; DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_CLASS (ti, AActor); PARAM_ANGLE_OPT (angle) { angle = 0.; } PARAM_BOOL_OPT (useammo) { useammo = true; } @@ -2224,7 +2224,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT (damage); PARAM_BOOL_OPT (norandom) { norandom = false; } PARAM_INT_OPT (flags) { flags = CPF_USEAMMO; } @@ -2328,7 +2328,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch) //========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT (damage); PARAM_INT_OPT (spawnofs_xy) { spawnofs_xy = 0; } PARAM_BOOL_OPT (useammo) { useammo = true; } @@ -2632,7 +2632,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_GiveToSiblings) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetInventory) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS(itemtype, AInventory); PARAM_INT(amount); PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } @@ -3012,7 +3012,7 @@ static bool InitSpawnedItem(AActor *self, AActor *mo, int flags) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItem) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_CLASS_OPT (missile, AActor) { missile = PClass::FindActor("Unknown"); } PARAM_FLOAT_OPT (distance) { distance = 0; } PARAM_FLOAT_OPT (zheight) { zheight = 0; } @@ -3144,7 +3144,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SpawnItemEx) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ThrowGrenade) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_CLASS (missile, AActor); PARAM_FLOAT_OPT (zheight) { zheight = 0; } PARAM_FLOAT_OPT (xyvel) { xyvel = 0; } @@ -3442,7 +3442,7 @@ enum FadeFlags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeIn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(reduce) { reduce = 0.1; } PARAM_INT_OPT(flags) { flags = 0; } @@ -3476,7 +3476,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeIn) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FadeOut) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(reduce) { reduce = 0.1; } PARAM_INT_OPT(flags) { flags = FTF_REMOVE; } @@ -4036,7 +4036,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckCeiling) //=========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_Stop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->Vel.Zero(); if (self->player && self->player->mo == self && !(self->player->cheats & CF_PREDICTING)) { @@ -4074,7 +4074,7 @@ enum RS_Flags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(flags) { flags = RSF_FOG; } bool oktorespawn = false; @@ -4189,7 +4189,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetGravity) DEFINE_ACTION_FUNCTION(AActor, A_ClearTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->target = NULL; self->LastHeard = NULL; self->lastenemy = NULL; @@ -4747,7 +4747,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfInTargetLOS) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckForReload) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if ( self->player == NULL || self->player->ReadyWeapon == NULL ) { @@ -4800,7 +4800,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckForReload) DEFINE_ACTION_FUNCTION(AActor, A_ResetReloadCounter) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player == NULL || self->player->ReadyWeapon == NULL) return 0; @@ -4859,7 +4859,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckFlag) //=========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_RaiseMaster) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT(copy) { copy = false; } if (self->master != NULL) @@ -4876,7 +4876,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseMaster) //=========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_RaiseChildren) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT(copy) { copy = false; } TThinkerIterator it; @@ -4899,7 +4899,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseChildren) //=========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_RaiseSiblings) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT(copy) { copy = false; } TThinkerIterator it; @@ -4975,7 +4975,7 @@ enum DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetAngle) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(angle) { angle = 0; } PARAM_INT_OPT(flags) { flags = 0; } PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } @@ -5077,7 +5077,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ScaleVelocity) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeVelocity) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT (x) { x = 0; } PARAM_FLOAT_OPT (y) { y = 0; } PARAM_FLOAT_OPT (z) { z = 0; } @@ -5302,7 +5302,7 @@ enum T_Flags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Teleport) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_STATE_OPT (teleport_state) { teleport_state = NULL; } PARAM_CLASS_OPT (target_type, ASpecialSpot) { target_type = PClass::FindActor("BossSpot"); } PARAM_CLASS_OPT (fog_type, AActor) { fog_type = PClass::FindActor("TeleportFog"); } @@ -5478,7 +5478,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Teleport) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(angle) { angle = 0; } self->Angles.Yaw += angle; return 0; @@ -5606,7 +5606,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Weave) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LineEffect) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(special) { special = 0; } PARAM_INT_OPT(tag) { tag = 0; } @@ -5641,7 +5641,7 @@ enum WolfAttackFlags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_WolfAttack) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (flags) { flags = 0; } PARAM_SOUND_OPT (sound) { sound = "weapons/pistol"; } PARAM_FLOAT_OPT (snipe) { snipe = 1.; } @@ -5746,7 +5746,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_WolfAttack) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Warp) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT(destination_selector); PARAM_FLOAT_OPT(xofs) { xofs = 0; } PARAM_FLOAT_OPT(yofs) { yofs = 0; } @@ -6170,7 +6170,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckSpecies) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTics) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT(tics_to_set); if (ACTION_CALL_FROM_PSPRITE()) @@ -6567,7 +6567,7 @@ static void DoKill(AActor *killtarget, AActor *inflictor, AActor *source, FName //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6590,7 +6590,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillTarget) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillTracer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6613,7 +6613,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillTracer) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillMaster) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6636,7 +6636,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillMaster) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillChildren) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6667,7 +6667,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillChildren) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KillSiblings) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6743,7 +6743,7 @@ static void DoRemove(AActor *removetarget, int flags, PClassActor *filter, FName //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } PARAM_NAME_OPT (species) { species = NAME_None; } @@ -6762,7 +6762,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTarget) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTracer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } PARAM_NAME_OPT (species) { species = NAME_None; } @@ -6781,7 +6781,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveTracer) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveMaster) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } PARAM_NAME_OPT (species) { species = NAME_None; } @@ -6800,7 +6800,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveMaster) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT (removeall) { removeall = false; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6826,7 +6826,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveChildren) //=========================================================================== DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RemoveSiblings) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_BOOL_OPT (removeall) { removeall = false; } PARAM_INT_OPT (flags) { flags = 0; } PARAM_CLASS_OPT (filter, AActor){ filter = NULL; } @@ -6897,7 +6897,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTeleFog) DEFINE_ACTION_FUNCTION(AActor, A_SwapTeleFog) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if ((self->TeleFogSourceType != self->TeleFogDestType)) //Does nothing if they're the same. { PClassActor *temp = self->TeleFogSourceType; @@ -6974,7 +6974,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetHealth) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ResetHealth) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } AActor *mobj = COPY_AAPTR(self, ptr); @@ -7291,7 +7291,7 @@ enum FMDFlags }; DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(offset) { offset = 0.; } PARAM_ANGLE_OPT(anglelimit) { anglelimit = 0.; } PARAM_ANGLE_OPT(pitchlimit) { pitchlimit = 0.; } @@ -7385,7 +7385,7 @@ enum CPSFFlags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CopySpriteFrame) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT(from); PARAM_INT(to); PARAM_INT_OPT(flags) { flags = 0; } @@ -7412,7 +7412,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CopySpriteFrame) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpriteAngle) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(angle) { angle = 0.; } PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } @@ -7435,7 +7435,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpriteAngle) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpriteRotation) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(angle) { angle = 0.; } PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } @@ -7466,7 +7466,7 @@ enum VRFFlags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetVisibleRotation) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(anglestart) { anglestart = 0.; } PARAM_ANGLE_OPT(angleend) { angleend = 0.; } PARAM_ANGLE_OPT(pitchstart) { pitchstart = 0.; } diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 5f63ff1e5..1a2bddda4 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -1789,7 +1789,7 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params) // DEFINE_ACTION_FUNCTION(AActor, A_Look) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *targ; @@ -1909,7 +1909,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT (flags) { flags = 0; } PARAM_FLOAT_OPT (minseedist) { minseedist = 0; } PARAM_FLOAT_OPT (maxseedist) { maxseedist = 0; } @@ -2101,7 +2101,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx) DEFINE_ACTION_FUNCTION(AActor, A_ClearLastHeard) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); self->LastHeard = NULL; return 0; } @@ -2126,7 +2126,7 @@ enum ChaseFlags DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Wander) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(flags) { flags = 0; } A_Wander(self, flags); return 0; @@ -2186,7 +2186,7 @@ void A_Wander(AActor *self, int flags) //========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_Look2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); AActor *targ; @@ -2768,7 +2768,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Chase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_STATE_OPT (melee) { melee = NULL; } PARAM_STATE_OPT (missile) { missile = NULL; } PARAM_INT_OPT (flags) { flags = 0; } @@ -2790,14 +2790,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Chase) DEFINE_ACTION_FUNCTION(AActor, A_FastChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_DoChase(stack, self, true, self->MeleeState, self->MissileState, true, true, false, 0); return 0; } DEFINE_ACTION_FUNCTION(AActor, A_VileChase) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!P_CheckForResurrection(self, true)) { A_DoChase(stack, self, false, self->MeleeState, self->MissileState, true, gameinfo.nightmarefast, false, 0); @@ -2947,7 +2947,7 @@ void A_FaceTarget(AActor *self) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceTarget) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(max_turn) { max_turn = 0.; } PARAM_ANGLE_OPT(max_pitch) { max_pitch = 270.; } PARAM_ANGLE_OPT(ang_offset) { ang_offset = 0.; } @@ -2961,7 +2961,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceTarget) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMaster) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(max_turn) { max_turn = 0.; } PARAM_ANGLE_OPT(max_pitch) { max_pitch = 270.; } PARAM_ANGLE_OPT(ang_offset) { ang_offset = 0.; } @@ -2975,7 +2975,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMaster) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceTracer) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_ANGLE_OPT(max_turn) { max_turn = 0.; } PARAM_ANGLE_OPT(max_pitch) { max_pitch = 270.; } PARAM_ANGLE_OPT(ang_offset) { ang_offset = 0.; } @@ -2996,7 +2996,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceTracer) //=========================================================================== DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (!self->target) return 0; @@ -3042,7 +3042,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail) DEFINE_ACTION_FUNCTION(AActor, A_Scream) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->DeathSound) { // Check for bosses. @@ -3061,7 +3061,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Scream) DEFINE_ACTION_FUNCTION(AActor, A_XScream) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player) S_Sound (self, CHAN_VOICE, "*gibbed", 1, ATTN_NORM); else @@ -3077,7 +3077,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_XScream) DEFINE_ACTION_FUNCTION(AActor, A_ScreamAndUnblock) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_Scream, self); A_Unblock(self, true); return 0; @@ -3091,7 +3091,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ScreamAndUnblock) DEFINE_ACTION_FUNCTION(AActor, A_ActiveSound) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->ActiveSound) { S_Sound (self, CHAN_VOICE, self->ActiveSound, 1, ATTN_NORM); @@ -3107,7 +3107,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ActiveSound) DEFINE_ACTION_FUNCTION(AActor, A_ActiveAndUnblock) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); CALL_ACTION(A_ActiveSound, self); A_Unblock(self, true); return 0; @@ -3257,7 +3257,7 @@ void P_TossItem (AActor *item) DEFINE_ACTION_FUNCTION(AActor, A_Pain) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); // [RH] Vary player pain sounds depending on health (ala Quake2) if (self->player && self->player->morphTics == 0) @@ -3306,7 +3306,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Pain) // killough 11/98: kill an object DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Die) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_NAME_OPT (damagetype) { damagetype = NAME_None; } P_DamageMobj(self, NULL, NULL, self->health, damagetype, DMG_FORCED); @@ -3320,7 +3320,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Die) DEFINE_ACTION_FUNCTION(AActor, A_Detonate) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int damage = self->GetMissileDamage(0, 1); P_RadiusAttack (self, self->target, damage, damage, self->DamageType, RADF_HURTSOURCE); P_CheckSplash(self, damage); @@ -3463,7 +3463,7 @@ void A_BossDeath(AActor *self) DEFINE_ACTION_FUNCTION(AActor, A_BossDeath) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); A_BossDeath(self); return 0; } @@ -3541,7 +3541,7 @@ bool A_RaiseMobj (AActor *actor, double speed) DEFINE_ACTION_FUNCTION(AActor, A_ClassBossHealth) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (multiplayer && !deathmatch) // co-op only { if (!self->special1) diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index e2e0778ab..055649466 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -743,7 +743,7 @@ void DoReadyWeapon(AActor *self) DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_WeaponReady) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(flags) { flags = 0; } DoReadyWeaponToSwitch(self, !(flags & WRF_NoSwitch)); @@ -875,7 +875,7 @@ static void P_CheckWeaponButtons (player_t *player) DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_ReFire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_STATE_OPT(state) { state = NULL; } A_ReFire(self, state); return 0; @@ -913,7 +913,7 @@ void A_ReFire(AActor *self, FState *state) DEFINE_ACTION_FUNCTION(AInventory, A_ClearReFire) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; if (NULL != player) @@ -935,7 +935,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_ClearReFire) DEFINE_ACTION_FUNCTION(AInventory, A_CheckReload) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -1002,7 +1002,7 @@ void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags) DEFINE_ACTION_FUNCTION(AActor, A_OverlayOffset) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT_OPT(layer) { layer = PSP_WEAPON; } PARAM_FLOAT_OPT(wx) { wx = 0.; } PARAM_FLOAT_OPT(wy) { wy = 32.; } @@ -1013,7 +1013,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_OverlayOffset) DEFINE_ACTION_FUNCTION(AActor, A_WeaponOffset) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_FLOAT_OPT(wx) { wx = 0.; } PARAM_FLOAT_OPT(wy) { wy = 32.; } PARAM_INT_OPT(flags) { flags = 0; } @@ -1029,7 +1029,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_WeaponOffset) DEFINE_ACTION_FUNCTION(AActor, A_OverlayFlags) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT(layer); PARAM_INT(flags); PARAM_BOOL(set); @@ -1072,7 +1072,7 @@ static double GetOverlayPosition(AActor *self, int layer, bool gety) DEFINE_ACTION_FUNCTION(AActor, OverlayX) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT_OPT(layer) { layer = 0; } if (ACTION_CALL_FROM_PSPRITE()) @@ -1085,7 +1085,7 @@ DEFINE_ACTION_FUNCTION(AActor, OverlayX) DEFINE_ACTION_FUNCTION(AActor, OverlayY) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT_OPT(layer) { layer = 0; } if (ACTION_CALL_FROM_PSPRITE()) @@ -1104,7 +1104,7 @@ DEFINE_ACTION_FUNCTION(AActor, OverlayY) DEFINE_ACTION_FUNCTION(AActor, OverlayID) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); if (ACTION_CALL_FROM_PSPRITE()) { @@ -1123,7 +1123,7 @@ DEFINE_ACTION_FUNCTION(AActor, OverlayID) DEFINE_ACTION_FUNCTION(AInventory, A_Lower) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); player_t *player = self->player; DPSprite *psp; @@ -1171,7 +1171,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Lower) DEFINE_ACTION_FUNCTION(AInventory, A_Raise) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self == nullptr) { @@ -1212,7 +1212,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Raise) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Overlay) { - PARAM_ACTION_PROLOGUE; + PARAM_ACTION_PROLOGUE(AActor); PARAM_INT (layer); PARAM_STATE_OPT (state) { state = nullptr; } PARAM_BOOL_OPT (dontoverride) { dontoverride = false; } @@ -1232,7 +1232,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Overlay) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ClearOverlays) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT_OPT(start) { start = 0; } PARAM_INT_OPT(stop) { stop = 0; } PARAM_BOOL_OPT(safety) { safety = true; } @@ -1283,7 +1283,7 @@ enum GF_Flags DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_STATE_OPT(flash) { flash = nullptr; } PARAM_INT_OPT (flags) { flags = 0; } @@ -1373,7 +1373,7 @@ void P_GunShot (AActor *mo, bool accurate, PClassActor *pufftype, DAngle pitch) DEFINE_ACTION_FUNCTION(AInventory, A_Light0) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -1384,7 +1384,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Light0) DEFINE_ACTION_FUNCTION(AInventory, A_Light1) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -1395,7 +1395,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Light1) DEFINE_ACTION_FUNCTION(AInventory, A_Light2) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player != NULL) { @@ -1406,7 +1406,7 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Light2) DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_Light) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_INT(light); if (self->player != NULL) diff --git a/src/p_user.cpp b/src/p_user.cpp index 7cea484de..00d22a9ba 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -1546,7 +1546,7 @@ void APlayerPawn::TweakSpeeds (double &forward, double &side) DEFINE_ACTION_FUNCTION(AActor, A_PlayerScream) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); int sound = 0; int chan = CHAN_VOICE; @@ -1622,7 +1622,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_PlayerScream) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullPop) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS_OPT(spawntype, APlayerChunk) { spawntype = NULL; } APlayerPawn *mo; @@ -1672,7 +1672,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SkullPop) DEFINE_ACTION_FUNCTION(AActor, A_CheckPlayerDone) { - PARAM_ACTION_PROLOGUE; + PARAM_SELF_PROLOGUE(AActor); if (self->player == NULL) { diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 1de5c13c2..c4a466873 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -5281,50 +5281,31 @@ ExpEmit FxVMFunctionCall::Emit(VMFunctionBuilder *build) } } - // If both functions are non-action or both are action, there is no need for special treatment. - //if (elf || (!!(Function->Variants[0].Flags & VARF_Action) == build->IsActionFunc)) + // Emit code to pass implied parameters + if (Function->Variants[0].Flags & VARF_Method) { - // Emit code to pass implied parameters - if (Function->Variants[0].Flags & VARF_Method) - { - assert(Self != nullptr); - Self->Emit(build); - count += 1; - } - if (Function->Variants[0].Flags & VARF_Action) - { - static_assert(NAP == 3, "This code needs to be updated if NAP changes"); - if (build->IsActionFunc) - { - build->Emit(OP_PARAM, 0, REGT_POINTER, 1); - build->Emit(OP_PARAM, 0, REGT_POINTER, 2); - } - else - { - int null = build->GetConstantAddress(nullptr, ATAG_GENERIC); - build->Emit(OP_PARAM, 0, REGT_POINTER | REGT_KONST, null); - build->Emit(OP_PARAM, 0, REGT_POINTER | REGT_KONST, null); - } - count += 2; - } + assert(Self != nullptr); + ExpEmit selfemit = Self->Emit(build); + assert(selfemit.RegType == REGT_POINTER); + build->Emit(OP_PARAM, 0, selfemit.RegType, selfemit.RegNum); + count += 1; } - /* - else + if (Function->Variants[0].Flags & VARF_Action) { - if (build->IsActionFunc && (Function->Variants[0].Flags & VARF_Method)) + static_assert(NAP == 3, "This code needs to be updated if NAP changes"); + if (build->IsActionFunc) { - build->Emit(OP_PARAM, 0, REGT_POINTER, 0); - count += 1; + build->Emit(OP_PARAM, 0, REGT_POINTER, 1); + build->Emit(OP_PARAM, 0, REGT_POINTER, 2); } - // and calling an action function from a non-action function. - // This must be blocked because it lacks crucial information. - if (!build->IsActionFunc && (Function->Variants[0].Flags & VARF_Action)) + else { - // This case should be eliminated in the analyzing stage. - I_Error("Cannot call action function from non-action functions."); + int null = build->GetConstantAddress(nullptr, ATAG_GENERIC); + build->Emit(OP_PARAM, 0, REGT_POINTER | REGT_KONST, null); + build->Emit(OP_PARAM, 0, REGT_POINTER | REGT_KONST, null); } + count += 2; } - */ // Emit code to pass explicit parameters if (ArgList != NULL) diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 4c09e8664..5144a1bd0 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -68,139 +68,139 @@ class Actor : Thinker native // Action functions // Meh, MBF redundant functions. Only for DeHackEd support. - action native void A_Turn(float angle = 0); - action native bool A_LineEffect(int boomspecial = 0, int tag = 0); + native void A_Turn(float angle = 0); + native bool A_LineEffect(int boomspecial = 0, int tag = 0); // End of MBF redundant functions. - action native void A_MonsterRail(); - action native void A_BFGSpray(class spraytype = "BFGExtra", int numrays = 40, int damagecount = 15, float angle = 90, float distance = 16*64, float vrange = 32, int damage = 0, int flags = 0); - action native void A_Pain(); - action native void A_NoBlocking(); - action native void A_XScream(); - action native void A_Look(); - action native void A_Chase(state melee = "*", state missile = "none", int flags = 0); - action native void A_FaceTarget(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); - action native void A_FaceTracer(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); - action native void A_FaceMaster(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); - action native void A_PosAttack(); - action native void A_Scream(); - action native void A_SPosAttack(); - action native void A_SPosAttackUseAtkSound(); - action native void A_VileChase(); - action native void A_VileStart(); - action native void A_VileTarget(class fire = "ArchvileFire"); - action native void A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire", int flags = 0); - action native void A_StartFire(); - action native void A_Fire(float spawnheight = 0); - action native void A_FireCrackle(); - action native void A_Tracer(); - action native void A_SkelWhoosh(); - action native void A_SkelFist(); - action native void A_SkelMissile(); - action native void A_FatRaise(); - action native void A_FatAttack1(class spawntype = "FatShot"); - action native void A_FatAttack2(class spawntype = "FatShot"); - action native void A_FatAttack3(class spawntype = "FatShot"); - action native void A_BossDeath(); - action native void A_CPosAttack(); - action native void A_CPosRefire(); - action native void A_TroopAttack(); - action native void A_SargAttack(); - action native void A_HeadAttack(); - action native void A_BruisAttack(); - action native void A_SkullAttack(float speed = 20); - action native void A_BetaSkullAttack(); - action native void A_Metal(); - action native void A_SpidRefire(); - action native void A_BabyMetal(); - action native void A_BspiAttack(); - action native void A_Hoof(); - action native void A_CyberAttack(); - action native void A_PainAttack(class spawntype = "LostSoul", float angle = 0, int flags = 0, int limit = -1); - action native void A_DualPainAttack(class spawntype = "LostSoul"); - action native void A_PainDie(class spawntype = "LostSoul"); - action native void A_KeenDie(int doortag = 666); - action native void A_BrainPain(); - action native void A_BrainScream(); - action native void A_BrainDie(); - action native void A_BrainAwake(); - action native void A_BrainSpit(class spawntype = "none"); // needs special treatment for default - action native void A_SpawnSound(); - action native void A_SpawnFly(class spawntype = "none"); // needs special treatment for default - action native void A_BrainExplode(); - action native void A_Die(name damagetype = "none"); - action native void A_Detonate(); - action native void A_Mushroom(class spawntype = "FatShot", int numspawns = 0, int flags = 0, float vrange = 4.0, float hrange = 0.5); + native void A_MonsterRail(); + native void A_BFGSpray(class spraytype = "BFGExtra", int numrays = 40, int damagecount = 15, float angle = 90, float distance = 16*64, float vrange = 32, int damage = 0, int flags = 0); + native void A_Pain(); + native void A_NoBlocking(); + native void A_XScream(); + native void A_Look(); + native void A_Chase(state melee = "*", state missile = "none", int flags = 0); + native void A_FaceTarget(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); + native void A_FaceTracer(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); + native void A_FaceMaster(float max_turn = 0, float max_pitch = 270, float ang_offset = 0, float pitch_offset = 0, int flags = 0, float z_ofs = 0); + native void A_PosAttack(); + native void A_Scream(); + native void A_SPosAttack(); + native void A_SPosAttackUseAtkSound(); + native void A_VileChase(); + native void A_VileStart(); + native void A_VileTarget(class fire = "ArchvileFire"); + native void A_VileAttack(sound snd = "vile/stop", int initialdmg = 20, int blastdmg = 70, int blastradius = 70, float thrustfac = 1.0, name damagetype = "Fire", int flags = 0); + native void A_StartFire(); + native void A_Fire(float spawnheight = 0); + native void A_FireCrackle(); + native void A_Tracer(); + native void A_SkelWhoosh(); + native void A_SkelFist(); + native void A_SkelMissile(); + native void A_FatRaise(); + native void A_FatAttack1(class spawntype = "FatShot"); + native void A_FatAttack2(class spawntype = "FatShot"); + native void A_FatAttack3(class spawntype = "FatShot"); + native void A_BossDeath(); + native void A_CPosAttack(); + native void A_CPosRefire(); + native void A_TroopAttack(); + native void A_SargAttack(); + native void A_HeadAttack(); + native void A_BruisAttack(); + native void A_SkullAttack(float speed = 20); + native void A_BetaSkullAttack(); + native void A_Metal(); + native void A_SpidRefire(); + native void A_BabyMetal(); + native void A_BspiAttack(); + native void A_Hoof(); + native void A_CyberAttack(); + native void A_PainAttack(class spawntype = "LostSoul", float angle = 0, int flags = 0, int limit = -1); + native void A_DualPainAttack(class spawntype = "LostSoul"); + native void A_PainDie(class spawntype = "LostSoul"); + native void A_KeenDie(int doortag = 666); + native void A_BrainPain(); + native void A_BrainScream(); + native void A_BrainDie(); + native void A_BrainAwake(); + native void A_BrainSpit(class spawntype = "none"); // needs special treatment for default + native void A_SpawnSound(); + native void A_SpawnFly(class spawntype = "none"); // needs special treatment for default + native void A_BrainExplode(); + native void A_Die(name damagetype = "none"); + native void A_Detonate(); + native void A_Mushroom(class spawntype = "FatShot", int numspawns = 0, int flags = 0, float vrange = 4.0, float hrange = 0.5); native bool A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0); - action native void A_SetFloorClip(); - action native void A_UnSetFloorClip(); - action native void A_HideThing(); - action native void A_UnHideThing(); - action native void A_SetInvulnerable(); - action native void A_UnSetInvulnerable(); - action native void A_SetReflective(); - action native void A_UnSetReflective(); - action native void A_SetReflectiveInvulnerable(); - action native void A_UnSetReflectiveInvulnerable(); - action native void A_SetShootable(); - action native void A_UnSetShootable(); - action native void A_NoGravity(); - action native void A_Gravity(); - action native void A_LowGravity(); + native void A_SetFloorClip(); + native void A_UnSetFloorClip(); + native void A_HideThing(); + native void A_UnHideThing(); + native void A_SetInvulnerable(); + native void A_UnSetInvulnerable(); + native void A_SetReflective(); + native void A_UnSetReflective(); + native void A_SetReflectiveInvulnerable(); + native void A_UnSetReflectiveInvulnerable(); + native void A_SetShootable(); + native void A_UnSetShootable(); + native void A_NoGravity(); + native void A_Gravity(); + native void A_LowGravity(); native void A_SetGravity(float gravity); - action native void A_Fall(); - action native void A_SetSolid(); - action native void A_UnsetSolid(); - action native void A_SetFloat(); - action native void A_UnsetFloat(); + native void A_Fall(); + native void A_SetSolid(); + native void A_UnsetSolid(); + native void A_SetFloat(); + native void A_UnsetFloat(); - action native void A_M_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class pufftype = "BulletPuff"); + native void A_M_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class pufftype = "BulletPuff"); - action native void A_ScreamAndUnblock(); - action native void A_ActiveAndUnblock(); - action native void A_ActiveSound(); + native void A_ScreamAndUnblock(); + native void A_ActiveAndUnblock(); + native void A_ActiveSound(); - action native void A_FastChase(); - action native void A_FreezeDeath(); - action native void A_FreezeDeathChunks(); - action native void A_GenericFreezeDeath(); - action native void A_IceGuyDie(); - action native void A_CentaurDefend(); - action native void A_BishopMissileWeave(); - action native void A_CStaffMissileSlither(); - action native void A_PlayerScream(); - action native void A_SkullPop(class skulltype = "BloodySkull"); - action native void A_CheckPlayerDone(); + native void A_FastChase(); + native void A_FreezeDeath(); + native void A_FreezeDeathChunks(); + native void A_GenericFreezeDeath(); + native void A_IceGuyDie(); + native void A_CentaurDefend(); + native void A_BishopMissileWeave(); + native void A_CStaffMissileSlither(); + native void A_PlayerScream(); + native void A_SkullPop(class skulltype = "BloodySkull"); + native void A_CheckPlayerDone(); - action native void A_Wander(int flags = 0); - action native void A_Look2(); - action native void A_TossGib(); - action native void A_SentinelBob(); - action native void A_SentinelRefire(); - action native void A_Tracer2(); - action native void A_SetShadow(); - action native void A_ClearShadow(); - action native void A_GetHurt(); - action native void A_TurretLook(); - action native void A_KlaxonBlare(); - action native void A_Countdown(); - action native void A_AlertMonsters(float maxdist = 0, int flags = 0); - action native void A_ClearSoundTarget(); - action native void A_FireAssaultGun(); - action native void A_CheckTerrain(); - action native void A_FaceConsolePlayer(float MaxTurnAngle = 0); // [TP] no-op + native void A_Wander(int flags = 0); + native void A_Look2(); + native void A_TossGib(); + native void A_SentinelBob(); + native void A_SentinelRefire(); + native void A_Tracer2(); + native void A_SetShadow(); + native void A_ClearShadow(); + native void A_GetHurt(); + native void A_TurretLook(); + native void A_KlaxonBlare(); + native void A_Countdown(); + native void A_AlertMonsters(float maxdist = 0, int flags = 0); + native void A_ClearSoundTarget(); + native void A_FireAssaultGun(); + native void A_CheckTerrain(); + native void A_FaceConsolePlayer(float MaxTurnAngle = 0); // [TP] no-op - deprecated action native void A_MissileAttack(); - deprecated action native void A_MeleeAttack(); - deprecated action native void A_ComboAttack(); - deprecated action native void A_BulletAttack(); - action native void A_WolfAttack(int flags = 0, sound whattoplay = "weapons/pistol", float snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, float runspeed = 160.0, class pufftype = "BulletPuff"); - action native void A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, float volume = 1.0, bool looping = false, float attenuation = ATTN_NORM); + deprecated native void A_MissileAttack(); + deprecated native void A_MeleeAttack(); + deprecated native void A_ComboAttack(); + deprecated native void A_BulletAttack(); + native void A_WolfAttack(int flags = 0, sound whattoplay = "weapons/pistol", float snipe = 1.0, int maxdamage = 64, int blocksize = 128, int pointblank = 2, int longrange = 4, float runspeed = 160.0, class pufftype = "BulletPuff"); + native void A_PlaySound(sound whattoplay = "weapons/pistol", int slot = CHAN_BODY, float volume = 1.0, bool looping = false, float attenuation = ATTN_NORM); native void A_PlayWeaponSound(sound whattoplay); - action native void A_FLoopActiveSound(); - action native void A_LoopActiveSound(); - action native void A_StopSound(int slot = CHAN_VOICE); // Bad default but that's what is originally was... + native void A_FLoopActiveSound(); + native void A_LoopActiveSound(); + native void A_StopSound(int slot = CHAN_VOICE); // Bad default but that's what is originally was... deprecated native void A_PlaySoundEx(sound whattoplay, name slot, bool looping = false, int attenuation = 0); deprecated native void A_StopSoundEx(name slot); native void A_SeekerMissile(int threshold, int turnmax, int flags = 0, int chance = 50, int distance = 10); @@ -227,8 +227,8 @@ class Actor : Thinker native native void A_LogFloat(float whattoprint); native void A_SetTranslucent(float alpha, int style = 0); native void A_SetRenderStyle(float alpha, int style); - action native void A_FadeIn(float reduce = 0.1, int flags = 0); - action native void A_FadeOut(float reduce = 0.1, int flags = 1); //bool remove == true + native void A_FadeIn(float reduce = 0.1, int flags = 0); + native void A_FadeOut(float reduce = 0.1, int flags = 1); //bool remove == true native void A_FadeTo(float target, float amount = 0.1, int flags = 0); native void A_SetScale(float scalex, float scaley = 0, int ptr = AAPTR_DEFAULT, bool usezero = false); native void A_SetMass(int mass); @@ -241,15 +241,15 @@ class Actor : Thinker native native void A_ChangeFlag(string flagname, bool value); native state A_CheckFlag(string flagname, state label, int check_pointer = AAPTR_DEFAULT); native state A_JumpIf(bool expression, state label); - action native void A_RaiseMaster(bool copy = 0); - action native void A_RaiseChildren(bool copy = 0); - action native void A_RaiseSiblings(bool copy = 0); + native void A_RaiseMaster(bool copy = 0); + native void A_RaiseChildren(bool copy = 0); + native void A_RaiseSiblings(bool copy = 0); native state A_CheckFloor(state label); native state A_CheckCeiling(state label); native state A_PlayerSkinCheck(state label); deprecated native void A_BasicAttack(int meleedamage, sound meleesound, class missiletype, float missileheight); - action native state, bool A_Teleport(state teleportstate = "", class targettype = "BossSpot", class fogtype = "TeleportFog", int flags = 0, float mindist = 0, float maxdist = 0, int ptr = AAPTR_DEFAULT); - action native state, bool A_Warp(int ptr_destination, float xofs = 0, float yofs = 0, float zofs = 0, float angle = 0, int flags = 0, state success_state = "", float heightoffset = 0, float radiusoffset = 0, float pitch = 0); + native state, bool A_Teleport(state teleportstate = "", class targettype = "BossSpot", class fogtype = "TeleportFog", int flags = 0, float mindist = 0, float maxdist = 0, int ptr = AAPTR_DEFAULT); + native state, bool A_Warp(int ptr_destination, float xofs = 0, float yofs = 0, float zofs = 0, float angle = 0, int flags = 0, state success_state = "", float heightoffset = 0, float radiusoffset = 0, float pitch = 0); action native bool A_ThrowGrenade(class itemtype, float zheight = 0, float xyvel = 0, float zvel = 0, bool useammo = true); native void A_Weave(int xspeed, int yspeed, float xdist, float ydist); @@ -260,42 +260,42 @@ class Actor : Thinker native native int A_RadiusGive(class itemtype, float distance, int flags, int amount = 0, class filter = "None", name species = "None", float mindist = 0, int limit = 0); native state A_CheckSpecies(state jump, name species = "", int ptr = AAPTR_DEFAULT); native void A_CountdownArg(int argnum, state targstate = ""); - action native void A_CustomMeleeAttack(int damage = 0, sound meleesound = "", sound misssound = "", name damagetype = "none", bool bleed = true); + native void A_CustomMeleeAttack(int damage = 0, sound meleesound = "", sound misssound = "", name damagetype = "none", bool bleed = true); native void A_CustomComboAttack(class missiletype, float spawnheight, int damage, sound meleesound = "", name damagetype = "none", bool bleed = true); native void A_Burst(class chunktype); action native void A_Blast(int flags = 0, float strength = 255, float radius = 255, float speed = 20, class blasteffect = "BlastEffect", sound blastsound = "BlastRadius"); - action native void A_RadiusThrust(int force = 128, int distance = -1, int flags = RTF_AFFECTSOURCE, int fullthrustdistance = 0); - action native void A_RadiusDamageSelf(int damage = 128, float distance = 128, int flags = 0, class flashtype = "None"); - action native int A_Explode(int damage = -1, int distance = -1, int flags = XF_HURTSOURCE, bool alert = false, int fulldamagedistance = 0, int nails = 0, int naildamage = 10, class pufftype = "BulletPuff", name damagetype = "none"); - action native void A_Stop(); - action native void A_Respawn(int flags = 1); - action native void A_BarrelDestroy(); - action native void A_QueueCorpse(); - action native void A_DeQueueCorpse(); - action native void A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 0, state label = ""); - action native void A_ClearLastHeard(); - action native void A_ClearTarget(); + native void A_RadiusThrust(int force = 128, int distance = -1, int flags = RTF_AFFECTSOURCE, int fullthrustdistance = 0); + native void A_RadiusDamageSelf(int damage = 128, float distance = 128, int flags = 0, class flashtype = "None"); + native int A_Explode(int damage = -1, int distance = -1, int flags = XF_HURTSOURCE, bool alert = false, int fulldamagedistance = 0, int nails = 0, int naildamage = 10, class pufftype = "BulletPuff", name damagetype = "none"); + native void A_Stop(); + native void A_Respawn(int flags = 1); + native void A_BarrelDestroy(); + native void A_QueueCorpse(); + native void A_DeQueueCorpse(); + native void A_LookEx(int flags = 0, float minseedist = 0, float maxseedist = 0, float maxheardist = 0, float fov = 0, state label = ""); + native void A_ClearLastHeard(); + native void A_ClearTarget(); native state A_CheckLOF(state jump, int flags = 0, float range = 0, float minrange = 0, float angle = 0, float pitch = 0, float offsetheight = 0, float offsetwidth = 0, int ptr_target = AAPTR_DEFAULT, float offsetforward = 0); native state A_JumpIfTargetInLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0); native state A_JumpIfInTargetLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0); native bool A_SelectWeapon(class whichweapon, int flags = 0); action native void A_Punch(); - action native void A_Feathers(); - action native void A_ClassBossHealth(); - action native void A_ShootGun(); - action native void A_RocketInFlight(); - action native void A_Bang4Cloud(); - action native void A_DropFire(); + native void A_Feathers(); + native void A_ClassBossHealth(); + native void A_ShootGun(); + native void A_RocketInFlight(); + native void A_Bang4Cloud(); + native void A_DropFire(); native void A_GiveQuestItem(int itemno); - action native void A_RemoveForcefield(); + native void A_RemoveForcefield(); native void A_DropWeaponPieces(class p1, class p2, class p3); - action native void A_PigPain (); + native void A_PigPain (); native state A_MonsterRefire(int chance, state label); - action native void A_SetAngle(float angle = 0, int flags = 0, int ptr = AAPTR_DEFAULT); + native void A_SetAngle(float angle = 0, int flags = 0, int ptr = AAPTR_DEFAULT); native void A_SetPitch(float pitch, int flags = 0, int ptr = AAPTR_DEFAULT); native void A_SetRoll(float roll, int flags = 0, int ptr = AAPTR_DEFAULT); native void A_ScaleVelocity(float scale, int ptr = AAPTR_DEFAULT); - action native void A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0, int ptr = AAPTR_DEFAULT); + native void A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0, int ptr = AAPTR_DEFAULT); native void A_SetArg(int pos, int value); deprecated native void A_SetUserVar(name varname, int value); deprecated native void A_SetUserArray(name varname, int index, int value); @@ -316,26 +316,26 @@ class Actor : Thinker native native void A_DamageTracer(int amount, name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); native void A_DamageChildren(int amount, name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); native void A_DamageSiblings(int amount, name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_KillTarget(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_KillMaster(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_KillTracer(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_KillChildren(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_KillSiblings(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); - action native void A_RemoveTarget(int flags = 0, class filter = "None", name species = "None"); - action native void A_RemoveMaster(int flags = 0, class filter = "None", name species = "None"); - action native void A_RemoveTracer(int flags = 0, class filter = "None", name species = "None"); - action native void A_RemoveChildren(bool removeall = false, int flags = 0, class filter = "None", name species = "None"); - action native void A_RemoveSiblings(bool removeall = false, int flags = 0, class filter = "None", name species = "None"); + native void A_KillTarget(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); + native void A_KillMaster(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); + native void A_KillTracer(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); + native void A_KillChildren(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); + native void A_KillSiblings(name damagetype = "none", int flags = 0, class filter = "None", name species = "None", int src = AAPTR_DEFAULT, int inflict = AAPTR_DEFAULT); + native void A_RemoveTarget(int flags = 0, class filter = "None", name species = "None"); + native void A_RemoveMaster(int flags = 0, class filter = "None", name species = "None"); + native void A_RemoveTracer(int flags = 0, class filter = "None", name species = "None"); + native void A_RemoveChildren(bool removeall = false, int flags = 0, class filter = "None", name species = "None"); + native void A_RemoveSiblings(bool removeall = false, int flags = 0, class filter = "None", name species = "None"); native void A_Remove(int removee, int flags = 0, class filter = "None", name species = "None"); native int A_GiveToChildren(class itemtype, int amount = 0); native int A_GiveToSiblings(class itemtype, int amount = 0); native int A_TakeFromChildren(class itemtype, int amount = 0); native int A_TakeFromSiblings(class itemtype, int amount = 0); native void A_SetTeleFog(class oldpos, class newpos); - action native void A_SwapTeleFog(); + native void A_SwapTeleFog(); native void A_SetFloatBobPhase(int bob); native void A_SetHealth(int health, int ptr = AAPTR_DEFAULT); - action native void A_ResetHealth(int ptr = AAPTR_DEFAULT); + native void A_ResetHealth(int ptr = AAPTR_DEFAULT); native state A_JumpIfHigherOrLower(state high, state low, float offsethigh = 0, float offsetlow = 0, bool includeHeight = true, int ptr = AAPTR_TARGET); native void A_SetSpecies(name species, int ptr = AAPTR_DEFAULT); native void A_SetRipperLevel(int level); @@ -346,20 +346,20 @@ class Actor : Thinker native native state A_CheckBlock(state block, int flags = 0, int ptr = AAPTR_DEFAULT, float xofs = 0, float yofs = 0, float zofs = 0, float angle = 0); native state A_CheckSightOrRange(float distance, state label, bool two_dimension = false); native state A_CheckRange(float distance, state label, bool two_dimension = false); - action native bool A_FaceMovementDirection(float offset = 0, float anglelimit = 0, float pitchlimit = 0, int flags = 0, int ptr = AAPTR_DEFAULT); - action native int A_ClearOverlays(int sstart = 0, int sstop = 0, bool safety = true); - action native bool A_CopySpriteFrame(int from, int to, int flags = 0); - action native bool A_SetSpriteAngle(float angle = 0, int ptr = AAPTR_DEFAULT); - action native bool A_SetSpriteRotation(float angle = 0, int ptr = AAPTR_DEFAULT); - action native bool A_SetVisibleRotation(float anglestart = 0, float angleend = 0, float pitchstart = 0, float pitchend = 0, int flags = 0, int ptr = AAPTR_DEFAULT); + native bool A_FaceMovementDirection(float offset = 0, float anglelimit = 0, float pitchlimit = 0, int flags = 0, int ptr = AAPTR_DEFAULT); + native int A_ClearOverlays(int sstart = 0, int sstop = 0, bool safety = true); + native bool A_CopySpriteFrame(int from, int to, int flags = 0); + native bool A_SetSpriteAngle(float angle = 0, int ptr = AAPTR_DEFAULT); + native bool A_SetSpriteRotation(float angle = 0, int ptr = AAPTR_DEFAULT); + native bool A_SetVisibleRotation(float anglestart = 0, float angleend = 0, float pitchstart = 0, float pitchend = 0, int flags = 0, int ptr = AAPTR_DEFAULT); native void A_SetTranslation(string transname); native void A_RearrangePointers(int newtarget, int newmaster = AAPTR_DEFAULT, int newtracer = AAPTR_DEFAULT, int flags=0); native void A_TransferPointer(int ptr_source, int ptr_recepient, int sourcefield, int recepientfield=AAPTR_DEFAULT, int flags=0); - action native void A_CopyFriendliness(int ptr_source = AAPTR_MASTER); + native void A_CopyFriendliness(int ptr_source = AAPTR_MASTER); action native bool A_Overlay(int layer, state start = "", bool nooverride = false); - action native void A_WeaponOffset(float wx = 0, float wy = 32, int flags = 0); + native void A_WeaponOffset(float wx = 0, float wy = 32, int flags = 0); action native void A_OverlayOffset(int layer = PSP_WEAPON, float wx = 0, float wy = 32, int flags = 0); action native void A_OverlayFlags(int layer, int flags, bool set); diff --git a/wadsrc/static/zscript/doom/scriptedmarine.txt b/wadsrc/static/zscript/doom/scriptedmarine.txt index 358bf4ea4..7a82513cb 100644 --- a/wadsrc/static/zscript/doom/scriptedmarine.txt +++ b/wadsrc/static/zscript/doom/scriptedmarine.txt @@ -19,22 +19,22 @@ class ScriptedMarine : Actor native PainSound "*pain50"; } - action native void A_M_Refire (bool ignoremissile=false); - action native void A_M_CheckAttack (); - action native void A_MarineChase (); - action native void A_MarineLook (); - action native void A_MarineNoise (); - action native void A_M_Punch (int force); - action native void A_M_SawRefire (); - action native void A_M_FirePistol (bool accurate); - action native void A_M_FireShotgun (); - action native void A_M_FireShotgun2 (); - action native void A_M_FireCGun(bool accurate); - action native void A_M_FireMissile (); - action native void A_M_FirePlasma (); - action native void A_M_FireRailgun (); - action native void A_M_BFGsound (); - action native void A_M_FireBFG (); + native void A_M_Refire (bool ignoremissile=false); + native void A_M_CheckAttack (); + native void A_MarineChase (); + native void A_MarineLook (); + native void A_MarineNoise (); + native void A_M_Punch (int force); + native void A_M_SawRefire (); + native void A_M_FirePistol (bool accurate); + native void A_M_FireShotgun (); + native void A_M_FireShotgun2 (); + native void A_M_FireCGun(bool accurate); + native void A_M_FireMissile (); + native void A_M_FirePlasma (); + native void A_M_FireRailgun (); + native void A_M_BFGsound (); + native void A_M_FireBFG (); States { diff --git a/wadsrc/static/zscript/heretic/chicken.txt b/wadsrc/static/zscript/heretic/chicken.txt index 2e5ada81c..77e2b0a92 100644 --- a/wadsrc/static/zscript/heretic/chicken.txt +++ b/wadsrc/static/zscript/heretic/chicken.txt @@ -26,8 +26,8 @@ class Beak : Weapon Weapon.SisterWeapon "BeakPowered"; } - action native void A_BeakRaise (); - action native void A_BeakAttackPL1(); + native void A_BeakRaise (); + native void A_BeakAttackPL1(); States { @@ -55,7 +55,7 @@ class BeakPowered : Beak Weapon.SisterWeapon "Beak"; } - action native void A_BeakAttackPL2(); + native void A_BeakAttackPL2(); States { diff --git a/wadsrc/static/zscript/heretic/dsparil.txt b/wadsrc/static/zscript/heretic/dsparil.txt index ebf60eb47..8cd60c8bb 100644 --- a/wadsrc/static/zscript/heretic/dsparil.txt +++ b/wadsrc/static/zscript/heretic/dsparil.txt @@ -38,10 +38,10 @@ class Sorcerer1 : Actor HitObituary "$OB_DSPARIL1HIT"; } - action native void A_Sor1Pain (); - action native void A_Sor1Chase (); - action native void A_Srcr1Attack (); - action native void A_SorcererRise (); + native void A_Sor1Pain (); + native void A_Sor1Chase (); + native void A_Srcr1Attack (); + native void A_SorcererRise (); States { @@ -142,10 +142,10 @@ class Sorcerer2 : Actor HitObituary "$OB_DSPARIL2HIT"; } - action native void A_Srcr2Decide (); - action native void A_Srcr2Attack (); - action native void A_Sor2DthInit (); - action native void A_Sor2DthLoop (); + native void A_Srcr2Decide (); + native void A_Srcr2Attack (); + native void A_Sor2DthInit (); + native void A_Sor2DthLoop (); States { @@ -210,7 +210,7 @@ class Sorcerer2FX1 : Actor RenderStyle "Add"; } - action native void A_BlueSpark (); + native void A_BlueSpark (); States { @@ -263,7 +263,7 @@ class Sorcerer2FX2 : Actor RenderStyle "Add"; } - action native void A_GenWizard (); + native void A_GenWizard (); States { diff --git a/wadsrc/static/zscript/heretic/hereticartifacts.txt b/wadsrc/static/zscript/heretic/hereticartifacts.txt index 154f48ad3..94271c8cd 100644 --- a/wadsrc/static/zscript/heretic/hereticartifacts.txt +++ b/wadsrc/static/zscript/heretic/hereticartifacts.txt @@ -80,7 +80,7 @@ Class ActivatedTimeBomb : Actor DeathSound "misc/timebomb"; } - action native void A_Timebomb(); + native void A_Timebomb(); States { diff --git a/wadsrc/static/zscript/heretic/hereticimp.txt b/wadsrc/static/zscript/heretic/hereticimp.txt index 9f5c0a23e..5764094de 100644 --- a/wadsrc/static/zscript/heretic/hereticimp.txt +++ b/wadsrc/static/zscript/heretic/hereticimp.txt @@ -26,10 +26,10 @@ class HereticImp : Actor HitObituary "$OB_HERETICIMPHIT"; } - action native void A_ImpMsAttack(); - action native void A_ImpDeath(); - action native void A_ImpXDeath1(); - action native void A_ImpExplode(); + native void A_ImpMsAttack(); + native void A_ImpDeath(); + native void A_ImpXDeath1(); + native void A_ImpExplode(); States diff --git a/wadsrc/static/zscript/heretic/hereticmisc.txt b/wadsrc/static/zscript/heretic/hereticmisc.txt index 0b90208b9..f858a6fa2 100644 --- a/wadsrc/static/zscript/heretic/hereticmisc.txt +++ b/wadsrc/static/zscript/heretic/hereticmisc.txt @@ -16,8 +16,8 @@ class Pod : Actor DeathSound "world/podexplode"; PushFactor 0.5; } - action native void A_PodPain (class podtype = "PodGoo"); - action native void A_RemovePod (); + native void A_PodPain (class podtype = "PodGoo"); + native void A_RemovePod (); States { @@ -75,7 +75,7 @@ class PodGenerator : Actor AttackSound "world/podgrow"; } - action native void A_MakePod (class podtype = "Pod"); + native void A_MakePod (class podtype = "Pod"); States { @@ -136,7 +136,7 @@ class TeleGlitter1 : Actor Damage 0; } - action native void A_AccTeleGlitter (); + native void A_AccTeleGlitter (); States { @@ -178,8 +178,8 @@ class Volcano : Actor +SOLID } - action native void A_VolcanoSet (); - action native void A_VolcanoBlast (); + native void A_VolcanoSet (); + native void A_VolcanoBlast (); States { @@ -210,7 +210,7 @@ class VolcanoBlast : Actor DeathSound "world/volcano/blast"; } - action native void A_VolcBallImpact (); + native void A_VolcBallImpact (); States { diff --git a/wadsrc/static/zscript/heretic/hereticweaps.txt b/wadsrc/static/zscript/heretic/hereticweaps.txt index eabecd9d8..0c3123c7c 100644 --- a/wadsrc/static/zscript/heretic/hereticweaps.txt +++ b/wadsrc/static/zscript/heretic/hereticweaps.txt @@ -23,7 +23,7 @@ class Staff : HereticWeapon Tag "$TAG_STAFF"; } - action native void A_StaffAttack (int damage, class puff); + native void A_StaffAttack (int damage, class puff); States { @@ -142,7 +142,7 @@ class GoldWand : HereticWeapon Tag "$TAG_GOLDWAND"; } - action native void A_FireGoldWandPL1 (); + native void A_FireGoldWandPL1 (); States { @@ -178,7 +178,7 @@ class GoldWandPowered : GoldWand Tag "$TAG_GOLDWANDP"; } - action native void A_FireGoldWandPL2 (); + native void A_FireGoldWandPL2 (); States { @@ -294,7 +294,7 @@ class Crossbow : HereticWeapon Tag "$TAG_CROSSBOW"; } - action native void A_FireCrossbowPL1 (); + native void A_FireCrossbowPL1 (); States { @@ -330,7 +330,7 @@ class CrossbowPowered : Crossbow Tag "$TAG_CROSSBOWP"; } - action native void A_FireCrossbowPL2(); + native void A_FireCrossbowPL2(); States { @@ -462,7 +462,7 @@ class Gauntlets : Weapon Obituary "$OB_MPGAUNTLETS"; } - action native void A_GauntletAttack (int power); + native void A_GauntletAttack (int power); States { @@ -574,7 +574,7 @@ class Mace : HereticWeapon Tag "$TAG_MACE"; } - action native void A_FireMacePL1(); + native void A_FireMacePL1(); States { @@ -611,7 +611,7 @@ class MacePowered : Mace Tag "$TAG_MACEP"; } - action native void A_FireMacePL2(); + native void A_FireMacePL2(); States { @@ -642,8 +642,8 @@ class MaceFX1 : Actor Obituary "$OB_MPMACE"; } - action native void A_MacePL1Check(); - action native void A_MaceBallImpact(); + native void A_MacePL1Check(); + native void A_MaceBallImpact(); States { @@ -670,7 +670,7 @@ class MaceFX2 : MaceFX1 SeeSound ""; } - action native void A_MaceBallImpact2(); + native void A_MaceBallImpact2(); States { @@ -725,7 +725,7 @@ class MaceFX4 : Actor native Obituary "$OB_MPPMACE"; } - action native void A_DeathBallImpact(); + native void A_DeathBallImpact(); States { @@ -778,7 +778,7 @@ class Blaster : HereticWeapon Obituary "$OB_MPBLASTER"; } - action native void A_FireBlasterPL1(); + native void A_FireBlasterPL1(); States { @@ -843,7 +843,7 @@ class BlasterFX1 : FastProjectile native Obituary "$OB_MPPBLASTER"; } - action native void A_SpawnRippers(); + native void A_SpawnRippers(); States { @@ -950,7 +950,7 @@ class SkullRod : HereticWeapon Tag "$TAG_SKULLROD"; } - action native void A_FireSkullRodPL1(); + native void A_FireSkullRodPL1(); States { @@ -984,7 +984,7 @@ class SkullRodPowered : SkullRod Tag "$TAG_SKULLRODP"; } - action native void A_FireSkullRodPL2(); + native void A_FireSkullRodPL2(); States { @@ -1053,9 +1053,9 @@ class HornRodFX2 : Actor native Obituary "$OB_MPPSKULLROD"; } - action native void A_AddPlayerRain(); - action native void A_HideInCeiling(); - action native void A_SkullRodStorm(); + native void A_AddPlayerRain(); + native void A_HideInCeiling(); + native void A_SkullRodStorm(); States { @@ -1094,7 +1094,7 @@ class RainPillar : Actor native Obituary "$OB_MPPSKULLROD"; } - action native void A_RainImpact(); + native void A_RainImpact(); States { @@ -1140,7 +1140,7 @@ class PhoenixRod : Weapon native Tag "$TAG_PHOENIXROD"; } - action native void A_FirePhoenixPL1(); + native void A_FirePhoenixPL1(); States { @@ -1176,9 +1176,9 @@ class PhoenixRodPowered : PhoenixRod native Tag "$TAG_PHOENIXRODP"; } - action native void A_InitPhoenixPL2(); - action native void A_FirePhoenixPL2(); - action native void A_ShutdownPhoenixPL2(); + native void A_InitPhoenixPL2(); + native void A_FirePhoenixPL2(); + native void A_ShutdownPhoenixPL2(); States { @@ -1212,7 +1212,7 @@ class PhoenixFX1 : Actor native Obituary "$OB_MPPHOENIXROD"; } - action native void A_PhoenixPuff(); + native void A_PhoenixPuff(); States { @@ -1265,8 +1265,8 @@ class PhoenixFX2 : Actor native Obituary "$OB_MPPPHOENIXROD"; } - action native void A_FlameEnd(); - action native void A_FloatPuff(); + native void A_FlameEnd(); + native void A_FloatPuff(); States { diff --git a/wadsrc/static/zscript/heretic/ironlich.txt b/wadsrc/static/zscript/heretic/ironlich.txt index 9b66bcb0d..e6ba05e05 100644 --- a/wadsrc/static/zscript/heretic/ironlich.txt +++ b/wadsrc/static/zscript/heretic/ironlich.txt @@ -27,7 +27,7 @@ class Ironlich : Actor DropItem "ArtiEgg", 51, 0; } - action native void A_LichAttack (); + native void A_LichAttack (); States { @@ -74,7 +74,7 @@ class HeadFX1 : Actor RenderStyle "Add"; } - action native void A_LichIceImpact(); + native void A_LichIceImpact(); States { @@ -135,7 +135,7 @@ class HeadFX3 : Actor RenderStyle "Add"; } - action native void A_LichFireGrow (); + native void A_LichFireGrow (); States { @@ -174,7 +174,7 @@ class Whirlwind : Actor native Alpha 0.4; } - action native void A_WhirlwindSeek(); + native void A_WhirlwindSeek(); States { diff --git a/wadsrc/static/zscript/heretic/knight.txt b/wadsrc/static/zscript/heretic/knight.txt index f8b84b9aa..1eb341859 100644 --- a/wadsrc/static/zscript/heretic/knight.txt +++ b/wadsrc/static/zscript/heretic/knight.txt @@ -23,7 +23,7 @@ class Knight : Actor DropItem "CrossbowAmmo", 84, 5; } - action native void A_KnightAttack (); + native void A_KnightAttack (); States { @@ -116,7 +116,7 @@ class RedAxe : KnightAxe Damage 7; } - action native void A_DripBlood (); + native void A_DripBlood (); States { diff --git a/wadsrc/static/zscript/heretic/wizard.txt b/wadsrc/static/zscript/heretic/wizard.txt index 3599354ad..d33e2dd8a 100644 --- a/wadsrc/static/zscript/heretic/wizard.txt +++ b/wadsrc/static/zscript/heretic/wizard.txt @@ -26,10 +26,10 @@ class Wizard : Actor DropItem "ArtiTomeOfPower", 4, 0; } - action native void A_GhostOff (); - action native void A_WizAtk1 (); - action native void A_WizAtk2 (); - action native void A_WizAtk3 (); + native void A_GhostOff (); + native void A_WizAtk1 (); + native void A_WizAtk2 (); + native void A_WizAtk3 (); States { diff --git a/wadsrc/static/zscript/hexen/bats.txt b/wadsrc/static/zscript/hexen/bats.txt index f96f93272..1e6ee459f 100644 --- a/wadsrc/static/zscript/hexen/bats.txt +++ b/wadsrc/static/zscript/hexen/bats.txt @@ -9,8 +9,8 @@ class BatSpawner : SwitchableDecoration RenderStyle "None"; } - action native void A_BatSpawnInit(); - action native void A_BatSpawn(); + native void A_BatSpawnInit(); + native void A_BatSpawn(); States { @@ -39,7 +39,7 @@ class Bat : Actor +NOTELEPORT +CANPASS } - action native void A_BatMove(); + native void A_BatMove(); States { diff --git a/wadsrc/static/zscript/hexen/bishop.txt b/wadsrc/static/zscript/hexen/bishop.txt index 4dbb0d226..d116ee932 100644 --- a/wadsrc/static/zscript/hexen/bishop.txt +++ b/wadsrc/static/zscript/hexen/bishop.txt @@ -23,13 +23,13 @@ class Bishop : Actor Obituary"$OB_BISHOP"; } - action native void A_BishopChase(); - action native void A_BishopDecide(); - action native void A_BishopDoBlur(); - action native void A_BishopSpawnBlur(); - action native void A_BishopPainBlur(); - action native void A_BishopAttack(); - action native void A_BishopAttack2(); + native void A_BishopChase(); + native void A_BishopDecide(); + native void A_BishopDoBlur(); + native void A_BishopSpawnBlur(); + native void A_BishopPainBlur(); + native void A_BishopAttack(); + native void A_BishopAttack2(); States { diff --git a/wadsrc/static/zscript/hexen/clericboss.txt b/wadsrc/static/zscript/hexen/clericboss.txt index 6493cde89..a2019bae5 100644 --- a/wadsrc/static/zscript/hexen/clericboss.txt +++ b/wadsrc/static/zscript/hexen/clericboss.txt @@ -18,7 +18,7 @@ class ClericBoss : Actor Obituary "$OBCBOSS"; } - action native void A_ClericAttack(); + native void A_ClericAttack(); States { diff --git a/wadsrc/static/zscript/hexen/clericflame.txt b/wadsrc/static/zscript/hexen/clericflame.txt index ae5ecaac3..e72496530 100644 --- a/wadsrc/static/zscript/hexen/clericflame.txt +++ b/wadsrc/static/zscript/hexen/clericflame.txt @@ -16,7 +16,7 @@ class CWeapFlame : ClericWeapon Tag "$TAG_CWEAPFLAME"; } - action native void A_CFlameAttack(); + native void A_CFlameAttack(); States { @@ -140,7 +140,7 @@ class CircleFlame : Actor Obituary "$OB_MPCWEAPFLAME"; } - action native void A_CFlameRotate(); + native void A_CFlameRotate(); States { @@ -184,8 +184,8 @@ class CFlameMissile : FastProjectile native Obituary "$OB_MPCWEAPFLAME"; } - action native void A_CFlamePuff(); - action native void A_CFlameMissile(); + native void A_CFlamePuff(); + native void A_CFlameMissile(); States { diff --git a/wadsrc/static/zscript/hexen/clericholy.txt b/wadsrc/static/zscript/hexen/clericholy.txt index b238ce09b..6fc9cf43d 100644 --- a/wadsrc/static/zscript/hexen/clericholy.txt +++ b/wadsrc/static/zscript/hexen/clericholy.txt @@ -96,8 +96,8 @@ class CWeapWraithverge : ClericWeapon native Inventory.PickupSound "WeaponBuild"; } - action native void A_CHolyAttack(); - action native void A_CHolyPalette(); + native void A_CHolyAttack(); + native void A_CHolyPalette(); States { @@ -139,7 +139,7 @@ class HolyMissile : Actor +EXTREMEDEATH } - action native void A_CHolyAttack2(); + native void A_CHolyAttack2(); States { @@ -211,8 +211,8 @@ class HolySpirit : Actor native Obituary "$OB_MPCWEAPWRAITHVERGE"; } - action native void A_CHolySeek(); - action native void A_CHolyCheckScream(); + native void A_CHolySeek(); + native void A_CHolyCheckScream(); States { @@ -242,7 +242,7 @@ class HolyTail : Actor Alpha 0.6; } - action native void A_CHolyTail(); + native void A_CHolyTail(); States { diff --git a/wadsrc/static/zscript/hexen/clericmace.txt b/wadsrc/static/zscript/hexen/clericmace.txt index 5e00b9c3b..b47974d4b 100644 --- a/wadsrc/static/zscript/hexen/clericmace.txt +++ b/wadsrc/static/zscript/hexen/clericmace.txt @@ -13,7 +13,7 @@ class CWeapMace : ClericWeapon Tag "$TAG_CWEAPMACE"; } - action native void A_CMaceAttack(); + native void A_CMaceAttack(); States { diff --git a/wadsrc/static/zscript/hexen/clericstaff.txt b/wadsrc/static/zscript/hexen/clericstaff.txt index 7ae0e9da3..c33f14a80 100644 --- a/wadsrc/static/zscript/hexen/clericstaff.txt +++ b/wadsrc/static/zscript/hexen/clericstaff.txt @@ -16,10 +16,10 @@ class CWeapStaff : ClericWeapon Tag "$TAG_CWEAPSTAFF"; } - action native void A_CStaffInitBlink(); - action native void A_CStaffCheckBlink(); - action native void A_CStaffCheck(); - action native void A_CStaffAttack(); + native void A_CStaffInitBlink(); + native void A_CStaffCheckBlink(); + native void A_CStaffCheck(); + native void A_CStaffAttack(); States { diff --git a/wadsrc/static/zscript/hexen/dragon.txt b/wadsrc/static/zscript/hexen/dragon.txt index bfc037e71..6df3da943 100644 --- a/wadsrc/static/zscript/hexen/dragon.txt +++ b/wadsrc/static/zscript/hexen/dragon.txt @@ -23,12 +23,12 @@ class Dragon : Actor Obituary "$OB_DRAGON"; } - action native void A_DragonInitFlight(); - action native void A_DragonFlap(); - action native void A_DragonFlight(); - action native void A_DragonPain(); - action native void A_DragonAttack(); - action native void A_DragonCheckCrash(); + native void A_DragonInitFlight(); + native void A_DragonFlap(); + native void A_DragonFlight(); + native void A_DragonPain(); + native void A_DragonAttack(); + native void A_DragonCheckCrash(); States { @@ -77,7 +77,7 @@ class DragonFireball : Actor DeathSound "DragonFireballExplode"; } - action native void A_DragonFX2(); + native void A_DragonFX2(); States { diff --git a/wadsrc/static/zscript/hexen/fighteraxe.txt b/wadsrc/static/zscript/hexen/fighteraxe.txt index 30b235192..436172bef 100644 --- a/wadsrc/static/zscript/hexen/fighteraxe.txt +++ b/wadsrc/static/zscript/hexen/fighteraxe.txt @@ -17,12 +17,12 @@ class FWeapAxe : FighterWeapon native Tag "$TAG_FWEAPAXE"; } - action native void A_FAxeCheckUp(); - action native void A_FAxeCheckReady(); - action native void A_FAxeCheckAtk(); - action native void A_FAxeAttack(); - action native void A_FAxeCheckUpG(); - action native void A_FAxeCheckReadyG(); + native void A_FAxeCheckUp(); + native void A_FAxeCheckReady(); + native void A_FAxeCheckAtk(); + native void A_FAxeAttack(); + native void A_FAxeCheckUpG(); + native void A_FAxeCheckReadyG(); States { diff --git a/wadsrc/static/zscript/hexen/fighterboss.txt b/wadsrc/static/zscript/hexen/fighterboss.txt index aa3e28ce7..8e862de30 100644 --- a/wadsrc/static/zscript/hexen/fighterboss.txt +++ b/wadsrc/static/zscript/hexen/fighterboss.txt @@ -19,7 +19,7 @@ class FighterBoss : Actor Obituary "$OB_FBOSS"; } - action native void A_FighterAttack(); + native void A_FighterAttack(); States { diff --git a/wadsrc/static/zscript/hexen/fighterfist.txt b/wadsrc/static/zscript/hexen/fighterfist.txt index 8428ebe7d..e556ebd87 100644 --- a/wadsrc/static/zscript/hexen/fighterfist.txt +++ b/wadsrc/static/zscript/hexen/fighterfist.txt @@ -13,7 +13,7 @@ class FWeapFist : FighterWeapon Tag "$TAG_FWEAPFIST"; } - action native void A_FPunchAttack(); + native void A_FPunchAttack(); States { diff --git a/wadsrc/static/zscript/hexen/fighterhammer.txt b/wadsrc/static/zscript/hexen/fighterhammer.txt index f415cbb72..0104c7670 100644 --- a/wadsrc/static/zscript/hexen/fighterhammer.txt +++ b/wadsrc/static/zscript/hexen/fighterhammer.txt @@ -18,8 +18,8 @@ class FWeapHammer : FighterWeapon Tag "$TAG_FWEAPHAMMER"; } - action native void A_FHammerAttack(); - action native void A_FHammerThrow(); + native void A_FHammerAttack(); + native void A_FHammerThrow(); States { diff --git a/wadsrc/static/zscript/hexen/fighterquietus.txt b/wadsrc/static/zscript/hexen/fighterquietus.txt index 5fe132237..2430cd70c 100644 --- a/wadsrc/static/zscript/hexen/fighterquietus.txt +++ b/wadsrc/static/zscript/hexen/fighterquietus.txt @@ -97,7 +97,7 @@ class FWeapQuietus : FighterWeapon Tag "$TAG_FWEAPQUIETUS"; } - action native void A_FSwordAttack(); + native void A_FSwordAttack(); States { @@ -146,7 +146,7 @@ class FSwordMissile : Actor native Obituary "$OB_MPFWEAPQUIETUS"; } - action native void A_FSwordFlames(); + native void A_FSwordFlames(); States { diff --git a/wadsrc/static/zscript/hexen/firedemon.txt b/wadsrc/static/zscript/hexen/firedemon.txt index f79303400..001e1629f 100644 --- a/wadsrc/static/zscript/hexen/firedemon.txt +++ b/wadsrc/static/zscript/hexen/firedemon.txt @@ -23,10 +23,10 @@ class FireDemon : Actor Obituary "$OB_FIREDEMON"; } - action native void A_FiredRocks(); - action native void A_FiredChase(); - action native void A_FiredAttack(); - action native void A_FiredSplotch(); + native void A_FiredRocks(); + native void A_FiredChase(); + native void A_FiredAttack(); + native void A_FiredSplotch(); States { @@ -124,7 +124,7 @@ class FireDemonRock1 : Actor +NOTELEPORT } - action native void A_SmBounce(); + native void A_SmBounce(); States { diff --git a/wadsrc/static/zscript/hexen/flechette.txt b/wadsrc/static/zscript/hexen/flechette.txt index 4b3cd914c..6f7b3a818 100644 --- a/wadsrc/static/zscript/hexen/flechette.txt +++ b/wadsrc/static/zscript/hexen/flechette.txt @@ -10,7 +10,7 @@ class PoisonBag : Actor +NOBLOCKMAP +NOGRAVITY } - action native void A_PoisonBagInit(); + native void A_PoisonBagInit(); States { @@ -37,7 +37,7 @@ class FireBomb : Actor DeathSound "FlechetteExplode"; } - action native void A_TimeBomb(); + native void A_TimeBomb(); States { @@ -69,8 +69,8 @@ class ThrowingBomb : Actor DeathSound "FlechetteExplode"; } - action native void A_CheckThrowBomb(); - action native void A_CheckThrowBomb2(); + native void A_CheckThrowBomb(); + native void A_CheckThrowBomb2(); States { @@ -193,8 +193,8 @@ class PoisonCloud : Actor native DamageType "PoisonCloud"; } - action native void A_PoisonBagDamage(); - action native void A_PoisonBagCheck(); + native void A_PoisonBagDamage(); + native void A_PoisonBagCheck(); States { @@ -233,7 +233,7 @@ class ZPoisonShroom : PoisonBag DeathSound "PoisonShroomDeath"; } - action native void A_PoisonShroom(); + native void A_PoisonShroom(); States { diff --git a/wadsrc/static/zscript/hexen/flies.txt b/wadsrc/static/zscript/hexen/flies.txt index 35c52a124..464e6e9d9 100644 --- a/wadsrc/static/zscript/hexen/flies.txt +++ b/wadsrc/static/zscript/hexen/flies.txt @@ -15,8 +15,8 @@ class LittleFly : Actor ActiveSound "FlyBuzz"; } - action native void A_FlySearch(); - action native void A_FlyBuzz(); + native void A_FlySearch(); + native void A_FlyBuzz(); States { diff --git a/wadsrc/static/zscript/hexen/fog.txt b/wadsrc/static/zscript/hexen/fog.txt index 84cc6c03e..93b5e9593 100644 --- a/wadsrc/static/zscript/hexen/fog.txt +++ b/wadsrc/static/zscript/hexen/fog.txt @@ -11,7 +11,7 @@ class FogSpawner : Actor +INVISIBLE } - action native void A_FogSpawn(); + native void A_FogSpawn(); States { @@ -34,7 +34,7 @@ class FogPatchSmall : Actor Alpha 0.6; } - action native void A_FogMove(); + native void A_FogMove(); States { diff --git a/wadsrc/static/zscript/hexen/heresiarch.txt b/wadsrc/static/zscript/hexen/heresiarch.txt index 076bc01ca..6ffc11b3b 100644 --- a/wadsrc/static/zscript/hexen/heresiarch.txt +++ b/wadsrc/static/zscript/hexen/heresiarch.txt @@ -27,10 +27,10 @@ class Heresiarch native Obituary "$OB_HERESIARCH"; } - action native void A_SorcSpinBalls(); - action native void A_SpeedBalls(); - action native void A_SorcBossAttack(); - action native void A_SpawnFizzle(); + native void A_SorcSpinBalls(); + native void A_SpeedBalls(); + native void A_SorcBossAttack(); + native void A_SpawnFizzle(); States { @@ -93,9 +93,9 @@ class SorcBall native DeathSound "SorcererBigBallExplode"; } - action native void A_SorcBallOrbit(); - action native void A_SorcBallPop(); - action native void A_BounceCheck (); + native void A_SorcBallOrbit(); + native void A_SorcBallPop(); + native void A_BounceCheck (); } // First ball (purple) - fires projectiles ---------------------------------- @@ -188,7 +188,7 @@ class SorcFX1 : Actor DeathSound "SorcererHeadScream"; } - action native void A_SorcFX1Seek(); + native void A_SorcFX1Seek(); States { @@ -218,8 +218,8 @@ class SorcFX2 : Actor +NOTELEPORT } - action native void A_SorcFX2Split(); - action native void A_SorcFX2Orbit (); + native void A_SorcFX2Split(); + native void A_SorcFX2Orbit (); states { @@ -268,8 +268,8 @@ class SorcFX3 : Actor SeeSound "SorcererBishopSpawn"; } - action native void A_SpawnBishop(); - action native void A_SorcererBishopEntry(); + native void A_SpawnBishop(); + native void A_SorcererBishopEntry(); States { @@ -323,7 +323,7 @@ class SorcFX4 : Actor DeathSound "SorcererBallExplode"; } - action native void A_SorcFX4Check(); + native void A_SorcFX4Check(); States { diff --git a/wadsrc/static/zscript/hexen/hexenspecialdecs.txt b/wadsrc/static/zscript/hexen/hexenspecialdecs.txt index 97c6ea41e..30ae0fff1 100644 --- a/wadsrc/static/zscript/hexen/hexenspecialdecs.txt +++ b/wadsrc/static/zscript/hexen/hexenspecialdecs.txt @@ -95,7 +95,7 @@ class Pottery1 : Actor native +NOICEDEATH } - action native void A_PotteryExplode(); + native void A_PotteryExplode(); States { @@ -153,8 +153,8 @@ class PotteryBit : Actor +NOICEDEATH } - action native void A_PotteryChooseBit(); - action native void A_PotteryCheck(); + native void A_PotteryChooseBit(); + native void A_PotteryCheck(); States { @@ -212,7 +212,7 @@ class ZCorpseLynchedNoHeart : Actor native +SOLID +SPAWNCEILING +NOGRAVITY } - action native void A_CorpseBloodDrip(); + native void A_CorpseBloodDrip(); States { @@ -289,7 +289,7 @@ class ZCorpseSitting : Actor DeathSound "FireDemonDeath"; } - action native void A_CorpseExplode(); + native void A_CorpseExplode(); States { @@ -313,7 +313,7 @@ class LeafSpawner : Actor +INVISIBLE } - action native void A_LeafSpawn(); + native void A_LeafSpawn(); States { @@ -338,8 +338,8 @@ class Leaf1 : Actor +NOICEDEATH } - action native void A_LeafThrust(); - action native void A_LeafCheck(); + native void A_LeafThrust(); + native void A_LeafCheck(); States { @@ -556,7 +556,7 @@ class ZSuitOfArmor : Actor DeathSound "SuitofArmorBreak"; } - action native void A_SoAExplode(); + native void A_SoAExplode(); States { @@ -621,8 +621,8 @@ class ZBell : Actor native DeathSound "BellRing"; } - action native void A_BellReset1(); - action native void A_BellReset2(); + native void A_BellReset1(); + native void A_BellReset2(); States { diff --git a/wadsrc/static/zscript/hexen/iceguy.txt b/wadsrc/static/zscript/hexen/iceguy.txt index 635aea07f..8081d5a61 100644 --- a/wadsrc/static/zscript/hexen/iceguy.txt +++ b/wadsrc/static/zscript/hexen/iceguy.txt @@ -22,9 +22,9 @@ class IceGuy : Actor Obituary "$OB_ICEGUY"; } - action native void A_IceGuyLook(); - action native void A_IceGuyChase(); - action native void A_IceGuyAttack(); + native void A_IceGuyLook(); + native void A_IceGuyChase(); + native void A_IceGuyAttack(); States { @@ -69,7 +69,7 @@ class IceGuyFX : Actor DeathSound "IceGuyMissileExplode"; } - action native void A_IceGuyMissileExplode(); + native void A_IceGuyMissileExplode(); States { diff --git a/wadsrc/static/zscript/hexen/korax.txt b/wadsrc/static/zscript/hexen/korax.txt index 3928de884..16bf172a4 100644 --- a/wadsrc/static/zscript/hexen/korax.txt +++ b/wadsrc/static/zscript/hexen/korax.txt @@ -24,11 +24,11 @@ class Korax : Actor Obituary "$OB_KORAX"; } - action native void A_KoraxChase(); - action native void A_KoraxDecide(); - action native void A_KoraxBonePop(); - action native void A_KoraxMissile(); - action native void A_KoraxCommand(); + native void A_KoraxChase(); + native void A_KoraxDecide(); + native void A_KoraxBonePop(); + native void A_KoraxMissile(); + native void A_KoraxCommand(); States { @@ -94,7 +94,7 @@ class KoraxSpirit : Actor Alpha 0.4; } - action native void A_KSpiritRoam(); + native void A_KSpiritRoam(); States { @@ -119,8 +119,8 @@ class KoraxBolt : Actor RenderStyle "Add"; } - action native void A_KBolt(); - action native void A_KBoltRaise(); + native void A_KBolt(); + native void A_KBoltRaise(); States { diff --git a/wadsrc/static/zscript/hexen/mageboss.txt b/wadsrc/static/zscript/hexen/mageboss.txt index 083d21016..f9637f8d1 100644 --- a/wadsrc/static/zscript/hexen/mageboss.txt +++ b/wadsrc/static/zscript/hexen/mageboss.txt @@ -18,7 +18,7 @@ class MageBoss : Actor Obituary "$OB_MBOSS"; } - action native void A_MageAttack(); + native void A_MageAttack(); States { diff --git a/wadsrc/static/zscript/hexen/magecone.txt b/wadsrc/static/zscript/hexen/magecone.txt index 94452985c..471b5b0b7 100644 --- a/wadsrc/static/zscript/hexen/magecone.txt +++ b/wadsrc/static/zscript/hexen/magecone.txt @@ -17,7 +17,7 @@ class MWeapFrost : MageWeapon Tag "$TAG_MWEAPFROST"; } - action native void A_FireConePL1(); + native void A_FireConePL1(); States { @@ -63,7 +63,7 @@ class FrostMissile : Actor native Obituary "$OB_MPMWEAPFROST"; } - action native void A_ShedShard(); + native void A_ShedShard(); States { diff --git a/wadsrc/static/zscript/hexen/magelightning.txt b/wadsrc/static/zscript/hexen/magelightning.txt index 2c35a41e5..46687e813 100644 --- a/wadsrc/static/zscript/hexen/magelightning.txt +++ b/wadsrc/static/zscript/hexen/magelightning.txt @@ -16,8 +16,8 @@ class MWeapLightning : MageWeapon Tag "$TAG_MWEAPLIGHTNING"; } - action native void A_LightningReady(); - action native void A_MLightningAttack(class floor = "LightningFloor", class ceiling = "LightningCeiling"); + native void A_LightningReady(); + native void A_MLightningAttack(class floor = "LightningFloor", class ceiling = "LightningCeiling"); States { @@ -79,9 +79,9 @@ class LightningCeiling : Lightning RenderStyle "Add"; } - action native void A_LightningZap(); - action native void A_LightningClip(); - action native void A_LightningRemove(); + native void A_LightningZap(); + native void A_LightningClip(); + native void A_LightningRemove(); States { @@ -117,7 +117,7 @@ class LightningFloor : LightningCeiling RenderStyle "Add"; } - action native void A_LastZap(); + native void A_LastZap(); States { @@ -155,7 +155,7 @@ class LightningZap : Actor native Obituary "$OB_MPMWEAPLIGHTNING"; } - action native void A_ZapMimic(); + native void A_ZapMimic(); States { diff --git a/wadsrc/static/zscript/hexen/magestaff.txt b/wadsrc/static/zscript/hexen/magestaff.txt index b71c1e3dc..9338febe6 100644 --- a/wadsrc/static/zscript/hexen/magestaff.txt +++ b/wadsrc/static/zscript/hexen/magestaff.txt @@ -97,8 +97,8 @@ class MWeapBloodscourge : MageWeapon native Tag "$TAG_MWEAPBLOODSCOURGE"; } - action native void A_MStaffAttack(); - action native void A_MStaffPalette(); + native void A_MStaffAttack(); + native void A_MStaffPalette(); States { @@ -143,7 +143,7 @@ class MageStaffFX2 : Actor native Obituary "$OB_MPMWEAPBLOODSCOURGE"; } - action native void A_MStaffTrack(); + native void A_MStaffTrack(); States { diff --git a/wadsrc/static/zscript/hexen/pig.txt b/wadsrc/static/zscript/hexen/pig.txt index 8fa446882..6362ff36e 100644 --- a/wadsrc/static/zscript/hexen/pig.txt +++ b/wadsrc/static/zscript/hexen/pig.txt @@ -34,7 +34,7 @@ class Snout : Weapon Weapon.YAdjust 10; } - action native void A_SnoutAttack (); + native void A_SnoutAttack (); States { diff --git a/wadsrc/static/zscript/hexen/serpent.txt b/wadsrc/static/zscript/hexen/serpent.txt index 516d0c703..d8886ccb2 100644 --- a/wadsrc/static/zscript/hexen/serpent.txt +++ b/wadsrc/static/zscript/hexen/serpent.txt @@ -24,15 +24,15 @@ class Serpent : Actor HitObituary "$OB_SERPENTHIT"; } - action native void A_SerpentHumpDecide(); - action native void A_SerpentHide(); - action native void A_SerpentCheckForAttack(); - action native void A_SerpentSpawnGibs(); - action native void A_SerpentUnHide(); - action native void A_SerpentRaiseHump(); - action native void A_SerpentLowerHump(); - action native void A_SerpentChooseAttack(); - action native void A_SerpentMeleeAttack(); + native void A_SerpentHumpDecide(); + native void A_SerpentHide(); + native void A_SerpentCheckForAttack(); + native void A_SerpentSpawnGibs(); + native void A_SerpentUnHide(); + native void A_SerpentRaiseHump(); + native void A_SerpentLowerHump(); + native void A_SerpentChooseAttack(); + native void A_SerpentMeleeAttack(); States { @@ -159,7 +159,7 @@ class SerpentHead : Actor +NOBLOCKMAP } - action native void A_SerpentHeadCheck(); + native void A_SerpentHeadCheck(); States { @@ -183,9 +183,9 @@ class SerpentGib1 : Actor +NOBLOCKMAP +NOGRAVITY } - action native void A_FloatGib(); - action native void A_DelayGib(); - action native void A_SinkGib(); + native void A_FloatGib(); + native void A_DelayGib(); + native void A_SinkGib(); States { diff --git a/wadsrc/static/zscript/hexen/spike.txt b/wadsrc/static/zscript/hexen/spike.txt index 2c8b4e80a..58f763ccc 100644 --- a/wadsrc/static/zscript/hexen/spike.txt +++ b/wadsrc/static/zscript/hexen/spike.txt @@ -26,11 +26,11 @@ class ThrustFloor : Actor native Height 128; } - action native void A_ThrustRaise(); - action native void A_ThrustImpale(); - action native void A_ThrustLower(); - action native void A_ThrustInitDn(); - action native void A_ThrustInitUp(); + native void A_ThrustRaise(); + native void A_ThrustImpale(); + native void A_ThrustLower(); + native void A_ThrustInitDn(); + native void A_ThrustInitUp(); States { diff --git a/wadsrc/static/zscript/hexen/summon.txt b/wadsrc/static/zscript/hexen/summon.txt index 395d4760d..06ceb7e17 100644 --- a/wadsrc/static/zscript/hexen/summon.txt +++ b/wadsrc/static/zscript/hexen/summon.txt @@ -36,7 +36,7 @@ class SummoningDoll : Actor +NOTELEPORT } - action native void A_Summon(); + native void A_Summon(); States { diff --git a/wadsrc/static/zscript/hexen/teleportother.txt b/wadsrc/static/zscript/hexen/teleportother.txt index 90015b207..2de144d5f 100644 --- a/wadsrc/static/zscript/hexen/teleportother.txt +++ b/wadsrc/static/zscript/hexen/teleportother.txt @@ -41,11 +41,11 @@ class TelOtherFX1 : Actor native Speed 20; } - action native void A_TeloSpawnA(); - action native void A_TeloSpawnB(); - action native void A_TeloSpawnC(); - action native void A_TeloSpawnD(); - action native void A_CheckTeleRing (); + native void A_TeloSpawnA(); + native void A_TeloSpawnB(); + native void A_TeloSpawnC(); + native void A_TeloSpawnD(); + native void A_CheckTeleRing (); States { diff --git a/wadsrc/static/zscript/hexen/wraith.txt b/wadsrc/static/zscript/hexen/wraith.txt index a8b648a72..9d811ec5c 100644 --- a/wadsrc/static/zscript/hexen/wraith.txt +++ b/wadsrc/static/zscript/hexen/wraith.txt @@ -23,10 +23,10 @@ class Wraith : Actor Obituary "$OB_WRAITH"; } - action native void A_WraithInit(); - action native void A_WraithChase(); - action native void A_WraithFX3(); - action native void A_WraithMelee(); + native void A_WraithInit(); + native void A_WraithChase(); + native void A_WraithFX3(); + native void A_WraithMelee(); States { @@ -97,8 +97,8 @@ class WraithBuried : Wraith PainChance 0; } - action native void A_WraithRaiseInit(); - action native void A_WraithRaise(); + native void A_WraithRaiseInit(); + native void A_WraithRaise(); States { @@ -133,7 +133,7 @@ class WraithFX1 : Actor DeathSound "WraithMissileExplode"; } - action native void A_WraithFX2(); + native void A_WraithFX2(); States { diff --git a/wadsrc/static/zscript/raven/minotaur.txt b/wadsrc/static/zscript/raven/minotaur.txt index 9bc02fced..9bbbe81a0 100644 --- a/wadsrc/static/zscript/raven/minotaur.txt +++ b/wadsrc/static/zscript/raven/minotaur.txt @@ -26,15 +26,15 @@ class Minotaur : Actor native DropItem "PhoenixRodAmmo", 84, 10; } - action native void A_MinotaurDecide(); - action native void A_MinotaurAtk1(); - action native void A_MinotaurAtk2(); - action native void A_MinotaurAtk3(); - action native void A_MinotaurCharge(); - action native void A_MinotaurLook(); - action native void A_MinotaurRoam(); - action native void A_MinotaurChase(); - action native void A_MinotaurDeath(); + native void A_MinotaurDecide(); + native void A_MinotaurAtk1(); + native void A_MinotaurAtk2(); + native void A_MinotaurAtk3(); + native void A_MinotaurCharge(); + native void A_MinotaurLook(); + native void A_MinotaurRoam(); + native void A_MinotaurChase(); + native void A_MinotaurDeath(); States { @@ -179,7 +179,7 @@ class MinotaurFX2 : MinotaurFX1 DeathSound "minotaur/fx2hit"; } - action native void A_MntrFloorFire(); + native void A_MntrFloorFire(); states { diff --git a/wadsrc/static/zscript/shared/bridge.txt b/wadsrc/static/zscript/shared/bridge.txt index 08c788f8e..ea38796a7 100644 --- a/wadsrc/static/zscript/shared/bridge.txt +++ b/wadsrc/static/zscript/shared/bridge.txt @@ -9,7 +9,7 @@ class BridgeBall : Actor +NOGRAVITY } - action native void A_BridgeOrbit(); + native void A_BridgeOrbit(); States { @@ -36,7 +36,7 @@ class CustomBridge : Actor native RenderStyle "None"; } - action native void A_BridgeInit(class balltype = "BridgeBall"); + native void A_BridgeInit(class balltype = "BridgeBall"); states { diff --git a/wadsrc/static/zscript/shared/ice.txt b/wadsrc/static/zscript/shared/ice.txt index 9668466cb..534113785 100644 --- a/wadsrc/static/zscript/shared/ice.txt +++ b/wadsrc/static/zscript/shared/ice.txt @@ -21,7 +21,7 @@ class IceChunk : Actor +NOBLOCKMAP +MOVEWITHSECTOR } - action native void A_IceSetTics (); + native void A_IceSetTics (); States { diff --git a/wadsrc/static/zscript/shared/inventory.txt b/wadsrc/static/zscript/shared/inventory.txt index 80771e1a1..2fde3b3cd 100644 --- a/wadsrc/static/zscript/shared/inventory.txt +++ b/wadsrc/static/zscript/shared/inventory.txt @@ -11,10 +11,10 @@ class Inventory : Actor native } // These are regular functions for the item itself. - private action native void A_RestoreSpecialPosition(); - private action native void A_RestoreSpecialDoomThing(); - private action native void A_RestoreSpecialThing1(); - private action native void A_RestoreSpecialThing2(); + private native void A_RestoreSpecialPosition(); + private native void A_RestoreSpecialDoomThing(); + private native void A_RestoreSpecialThing1(); + private native void A_RestoreSpecialThing2(); States { @@ -46,20 +46,20 @@ class StateProvider : Inventory native action native void A_FireBullets(float spread_xy, float spread_z, int numbullets, int damageperbullet, class pufftype = "BulletPuff", int flags = 1, float range = 0, class missile = "", float Spawnheight = 32, float Spawnofs_xy = 0); action native void A_FireCustomMissile(class missiletype, float angle = 0, bool useammo = true, float spawnofs_xy = 0, float spawnheight = 0, int flags = 0, float pitch = 0); action native void A_RailAttack(int damage, int spawnofs_xy = 0, bool useammo = true, color color1 = "", color color2 = "", int flags = 0, float maxdiff = 0, class pufftype = "BulletPuff", float spread_xy = 0, float spread_z = 0, float range = 0, int duration = 0, float sparsity = 1.0, float driftspeed = 1.0, class spawnclass = "none", float spawnofs_z = 0, int spiraloffset = 270, int limit = 0); - action native void A_Light(int extralight); - action native void A_Light0(); - action native void A_Light1(); - action native void A_Light2(); - action native void A_LightInverse(); - action native void A_WeaponReady(int flags = 0); - action native void A_Lower(); - action native void A_Raise(); + native void A_Light(int extralight); + native void A_Light0(); + native void A_Light1(); + native void A_Light2(); + native void A_LightInverse(); + native void A_WeaponReady(int flags = 0); + native void A_Lower(); + native void A_Raise(); action native void A_FirePistol(); action native void A_FireShotgun(); action native void A_FireShotgun2(); - action native void A_OpenShotgun2(); - action native void A_LoadShotgun2(); - action native void A_CloseShotgun2(); + native void A_OpenShotgun2(); + native void A_LoadShotgun2(); + native void A_CloseShotgun2(); action native void A_FireCGun(); action native void A_FireSTGrenade(class grenadetype = "Grenade"); action native void A_FireMissile(); @@ -67,17 +67,17 @@ class StateProvider : Inventory native action native void A_FireRailgun(); action native void A_FireRailgunLeft(); action native void A_FireRailgunRight(); - action native void A_RailWait(); - action native void A_BFGsound(); + native void A_RailWait(); + native void A_BFGsound(); action native void A_FireBFG(); action native void A_FireOldBFG(); - action native void A_ReFire(state flash = ""); - action native void A_ClearReFire(); - action native void A_CheckReload(); - action native void A_GunFlash(state flash = "", int flags = 0); + native void A_ReFire(state flash = ""); + native void A_ClearReFire(); + native void A_CheckReload(); + native void A_GunFlash(state flash = "", int flags = 0); action native void A_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class pufftype = "BulletPuff", int flags = 0, float range = 0, float spread_xy = 2.8125, float spread_z = 0, float lifesteal = 0, int lifestealmax = 0, class armorbonustype = "ArmorBonus"); - action native state A_CheckForReload(int counter, state label, bool dontincrement = false); - action native void A_ResetReloadCounter(); + native state A_CheckForReload(int counter, state label, bool dontincrement = false); + native void A_ResetReloadCounter(); } class ScoreItem : Inventory native @@ -468,11 +468,11 @@ class Weapon : StateProvider native Stop; } - action native void A_ZoomFactor(float scale = 1, int flags = 0); + native void A_ZoomFactor(float scale = 1, int flags = 0); const ZOOM_INSTANT = 1; const ZOOM_NOSCALETURNING = 2; - action native void A_SetCrosshair(int xhair); + native void A_SetCrosshair(int xhair); } class WeaponGiver : Weapon native diff --git a/wadsrc/static/zscript/shared/specialspot.txt b/wadsrc/static/zscript/shared/specialspot.txt index a06d41c27..c0bf84de5 100644 --- a/wadsrc/static/zscript/shared/specialspot.txt +++ b/wadsrc/static/zscript/shared/specialspot.txt @@ -1,5 +1,5 @@ class SpecialSpot : Actor native { - action native void A_SpawnSingleItem(class type, int fail_sp = 0, int fail_co = 0, int fail_dm = 0); + native void A_SpawnSingleItem(class type, int fail_sp = 0, int fail_co = 0, int fail_dm = 0); } diff --git a/wadsrc/static/zscript/strife/acolyte.txt b/wadsrc/static/zscript/strife/acolyte.txt index 2f01cb836..0c1305b57 100644 --- a/wadsrc/static/zscript/strife/acolyte.txt +++ b/wadsrc/static/zscript/strife/acolyte.txt @@ -26,9 +26,9 @@ class Acolyte : StrifeHumanoid Obituary "$OB_ACOLYTE"; } - action native void A_BeShadowyFoe (); - action native void A_AcolyteBits (); - action native void A_AcolyteDie (); + native void A_BeShadowyFoe (); + native void A_AcolyteBits (); + native void A_AcolyteDie (); States { @@ -202,7 +202,7 @@ class AcolyteToBe : Acolyte -ISMONSTER } - action native void A_HideDecepticon (); + native void A_HideDecepticon (); States { diff --git a/wadsrc/static/zscript/strife/alienspectres.txt b/wadsrc/static/zscript/strife/alienspectres.txt index 42c8293d0..0fe9826f0 100644 --- a/wadsrc/static/zscript/strife/alienspectres.txt +++ b/wadsrc/static/zscript/strife/alienspectres.txt @@ -32,7 +32,7 @@ class AlienSpectre1 : SpectralMonster +NOICEDEATH } - action native void A_AlienSpectreDeath (); + native void A_AlienSpectreDeath (); States { diff --git a/wadsrc/static/zscript/strife/crusader.txt b/wadsrc/static/zscript/strife/crusader.txt index 334e9d803..02b08fc93 100644 --- a/wadsrc/static/zscript/strife/crusader.txt +++ b/wadsrc/static/zscript/strife/crusader.txt @@ -28,11 +28,11 @@ class Crusader : Actor Obituary "$OB_CRUSADER"; } - action native void A_CrusaderChoose (); - action native void A_CrusaderSweepLeft (); - action native void A_CrusaderSweepRight (); - action native void A_CrusaderRefire (); - action native void A_CrusaderDeath (); + native void A_CrusaderChoose (); + native void A_CrusaderSweepLeft (); + native void A_CrusaderSweepRight (); + native void A_CrusaderRefire (); + native void A_CrusaderDeath (); States { diff --git a/wadsrc/static/zscript/strife/entityboss.txt b/wadsrc/static/zscript/strife/entityboss.txt index d54a95a76..8ccdbbd02 100644 --- a/wadsrc/static/zscript/strife/entityboss.txt +++ b/wadsrc/static/zscript/strife/entityboss.txt @@ -32,7 +32,7 @@ class EntityPod : Actor SeeSound "misc/gibbed"; } - action native void A_SpawnEntity (); + native void A_SpawnEntity (); States { @@ -87,8 +87,8 @@ class EntityBoss : SpectralMonster Obituary "$OB_ENTITY"; } - action native void A_EntityAttack(); - action native void A_EntityDeath(); + native void A_EntityAttack(); + native void A_EntityDeath(); States { @@ -167,7 +167,7 @@ class EntitySecond : SpectralMonster Obituary "$OB_ENTITY"; } - action native void A_SubEntityDeath (); + native void A_SubEntityDeath (); States { diff --git a/wadsrc/static/zscript/strife/inquisitor.txt b/wadsrc/static/zscript/strife/inquisitor.txt index 5a053c74f..b27818a61 100644 --- a/wadsrc/static/zscript/strife/inquisitor.txt +++ b/wadsrc/static/zscript/strife/inquisitor.txt @@ -25,13 +25,13 @@ class Inquisitor : Actor Obituary "$OB_INQUISITOR"; } - action native void A_InquisitorWalk (); - action native void A_InquisitorDecide (); - action native void A_InquisitorAttack (); - action native void A_InquisitorJump (); - action native void A_InquisitorCheckLand (); - action native void A_TossArm (); - action native void A_ReaverRanged (); + native void A_InquisitorWalk (); + native void A_InquisitorDecide (); + native void A_InquisitorAttack (); + native void A_InquisitorJump (); + native void A_InquisitorCheckLand (); + native void A_TossArm (); + native void A_ReaverRanged (); States { diff --git a/wadsrc/static/zscript/strife/loremaster.txt b/wadsrc/static/zscript/strife/loremaster.txt index d3b437bbd..4a48cf4d3 100644 --- a/wadsrc/static/zscript/strife/loremaster.txt +++ b/wadsrc/static/zscript/strife/loremaster.txt @@ -91,7 +91,7 @@ class LoreShot : Actor native ActiveSound "loremaster/swish"; } - action native void A_LoremasterChain (); + native void A_LoremasterChain (); States { diff --git a/wadsrc/static/zscript/strife/oracle.txt b/wadsrc/static/zscript/strife/oracle.txt index 206dee164..6023629c2 100644 --- a/wadsrc/static/zscript/strife/oracle.txt +++ b/wadsrc/static/zscript/strife/oracle.txt @@ -19,7 +19,7 @@ class Oracle : Actor DropItem "Meat"; } - action native void A_WakeOracleSpectre (); + native void A_WakeOracleSpectre (); States { diff --git a/wadsrc/static/zscript/strife/programmer.txt b/wadsrc/static/zscript/strife/programmer.txt index cd577ff13..dc88a790f 100644 --- a/wadsrc/static/zscript/strife/programmer.txt +++ b/wadsrc/static/zscript/strife/programmer.txt @@ -33,10 +33,10 @@ class Programmer : Actor DropItem "Sigil1"; } - action native void A_ProgrammerMelee (); - action native void A_SpawnProgrammerBase (); - action native void A_ProgrammerDeath (); - action native void A_SpotLightning(); + native void A_ProgrammerMelee (); + native void A_SpawnProgrammerBase (); + native void A_ProgrammerDeath (); + native void A_SpotLightning(); States { diff --git a/wadsrc/static/zscript/strife/reaver.txt b/wadsrc/static/zscript/strife/reaver.txt index 0ce15fab8..7656a37a9 100644 --- a/wadsrc/static/zscript/strife/reaver.txt +++ b/wadsrc/static/zscript/strife/reaver.txt @@ -22,7 +22,7 @@ class Reaver : Actor Obituary "$OB_REAVER"; } - action native void A_ReaverRanged (); + native void A_ReaverRanged (); States { diff --git a/wadsrc/static/zscript/strife/rebels.txt b/wadsrc/static/zscript/strife/rebels.txt index 3ee0200dc..d9e65560f 100644 --- a/wadsrc/static/zscript/strife/rebels.txt +++ b/wadsrc/static/zscript/strife/rebels.txt @@ -122,7 +122,7 @@ class TeleporterBeacon : Inventory native Inventory.PickupMessage "$TXT_BEACON"; } - action native void A_Beacon (); + native void A_Beacon (); States { diff --git a/wadsrc/static/zscript/strife/sentinel.txt b/wadsrc/static/zscript/strife/sentinel.txt index 8108265cb..946a99ea2 100644 --- a/wadsrc/static/zscript/strife/sentinel.txt +++ b/wadsrc/static/zscript/strife/sentinel.txt @@ -28,7 +28,7 @@ class Sentinel : Actor Obituary "$OB_SENTINEL"; } - action native void A_SentinelAttack (); + native void A_SentinelAttack (); States { diff --git a/wadsrc/static/zscript/strife/sigil.txt b/wadsrc/static/zscript/strife/sigil.txt index d8b1f80f8..dab1db2f5 100644 --- a/wadsrc/static/zscript/strife/sigil.txt +++ b/wadsrc/static/zscript/strife/sigil.txt @@ -16,16 +16,16 @@ class Sigil : Weapon native Inventory.PickupMessage "$TXT_SIGIL"; } - action native void A_SelectPiece (); - action native void A_SelectSigilView (); - action native void A_SelectSigilDown (); - action native void A_SelectSigilAttack (); - action native void A_SigilCharge (); - action native void A_FireSigil1 (); - action native void A_FireSigil2 (); - action native void A_FireSigil3 (); - action native void A_FireSigil4 (); - action native void A_FireSigil5 (); + native void A_SelectPiece (); + native void A_SelectSigilView (); + native void A_SelectSigilDown (); + native void A_SelectSigilAttack (); + native void A_SigilCharge (); + native void A_FireSigil1 (); + native void A_FireSigil2 (); + native void A_FireSigil3 (); + native void A_FireSigil4 (); + native void A_FireSigil5 (); States { diff --git a/wadsrc/static/zscript/strife/spectral.txt b/wadsrc/static/zscript/strife/spectral.txt index df23f3663..d6a234904 100644 --- a/wadsrc/static/zscript/strife/spectral.txt +++ b/wadsrc/static/zscript/strife/spectral.txt @@ -12,10 +12,10 @@ class SpectralMonster : Actor native +NOICEDEATH } - action native void A_SpectreChunkSmall (); - action native void A_SpectreChunkLarge (); - action native void A_Spectre3Attack (); - action native void A_SpotLightning (); + native void A_SpectreChunkSmall (); + native void A_SpectreChunkLarge (); + native void A_Spectre3Attack (); + native void A_SpotLightning (); } @@ -124,7 +124,7 @@ class SpectralLightningH1 : SpectralLightningBase +SPECTRAL } - action native void A_SpectralLightningTail (); + native void A_SpectralLightningTail (); States { @@ -189,7 +189,7 @@ class SpectralLightningBigBall1 : SpectralLightningDeath2 +SPECTRAL } - action native void A_SpectralBigBallLightning (); + native void A_SpectralBigBallLightning (); States { @@ -259,7 +259,7 @@ class SpectralLightningSpot : SpectralLightningDeath1 Alpha 0.6; } - action native void A_SpectralLightning (); + native void A_SpectralLightning (); States { diff --git a/wadsrc/static/zscript/strife/stalker.txt b/wadsrc/static/zscript/strife/stalker.txt index b22e432c6..51a919041 100644 --- a/wadsrc/static/zscript/strife/stalker.txt +++ b/wadsrc/static/zscript/strife/stalker.txt @@ -28,11 +28,11 @@ class Stalker : Actor HitObituary "$OB_STALKER"; } - action native void A_StalkerLookInit (); - action native void A_StalkerChaseDecide (); - action native void A_StalkerWalk (); - action native void A_StalkerDrop (); - action native void A_StalkerAttack (); + native void A_StalkerLookInit (); + native void A_StalkerChaseDecide (); + native void A_StalkerWalk (); + native void A_StalkerDrop (); + native void A_StalkerAttack (); States { diff --git a/wadsrc/static/zscript/strife/strifeplayer.txt b/wadsrc/static/zscript/strife/strifeplayer.txt index 311bf308a..0b61e3122 100644 --- a/wadsrc/static/zscript/strife/strifeplayer.txt +++ b/wadsrc/static/zscript/strife/strifeplayer.txt @@ -36,9 +36,9 @@ class StrifePlayer : PlayerPawn Player.Colorset 7, "Blue", 0x90, 0x9F, 0x92, 0x20, 0x3F, 0x00, 0x1F, 0x50, 0x5F, 0x40, 0x4F, 0xC1, 0xCF, 0x01, 0x0F, 0xC0,0xC0,1,1, 0xD0, 0xDF, 0x10, 0x1F; } - action native void A_ItBurnsItBurns(); - action native void A_CrispyPlayer(); - action native void A_HandLower(); + native void A_ItBurnsItBurns(); + native void A_CrispyPlayer(); + native void A_HandLower(); States { diff --git a/wadsrc/static/zscript/strife/strifeweapons.txt b/wadsrc/static/zscript/strife/strifeweapons.txt index 4ae358bfa..bf94706c9 100644 --- a/wadsrc/static/zscript/strife/strifeweapons.txt +++ b/wadsrc/static/zscript/strife/strifeweapons.txt @@ -62,7 +62,7 @@ class PunchDagger : StrifeWeapon Tag "$TAG_PUNCHDAGGER"; } - action native void A_JabDagger (); + native void A_JabDagger (); States { @@ -184,9 +184,9 @@ class StrifeCrossbow : StrifeWeapon Inventory.Icon "CBOWA0"; } - action native void A_ClearFlash (); - action native void A_ShowElectricFlash (); - action native void A_FireArrow (class proj); + native void A_ClearFlash (); + native void A_ShowElectricFlash (); + native void A_FireArrow (class proj); States { @@ -331,7 +331,7 @@ class MiniMissileLauncher : StrifeWeapon Inventory.PickupMessage "$TXT_MMLAUNCHER"; } - action native void A_FireMiniMissile (); + native void A_FireMiniMissile (); States { @@ -446,7 +446,7 @@ class FlameThrower : StrifeWeapon Inventory.PickupMessage "$TXT_FLAMER"; } - action native void A_FireFlamer (); + native void A_FireFlamer (); States { @@ -492,7 +492,7 @@ class FlameMissile : Actor Obituary "$OB_MPFLAMETHROWER"; } - action native void A_FlameDie (); + native void A_FlameDie (); States { @@ -528,7 +528,7 @@ class Mauler : StrifeWeapon Obituary "$OB_MPMAULER1"; } - action native void A_FireMauler1 (); + native void A_FireMauler1 (); States { @@ -571,8 +571,8 @@ class Mauler2 : Mauler Tag "$TAG_MAULER2"; } - action native void A_FireMauler2Pre (); - action native void A_FireMauler2 (); + native void A_FireMauler2Pre (); + native void A_FireMauler2 (); States { @@ -639,7 +639,7 @@ class MaulerTorpedo : Actor Obituary "$OB_MPMAULER"; } - action native void A_MaulerTorpedoWave (); + native void A_MaulerTorpedoWave (); States { @@ -775,8 +775,8 @@ class PhosphorousFire : Actor native Obituary "$OB_MPPHOSPHOROUSGRENADE"; } - action native void A_Burnarea (); - action native void A_Burnination (); + native void A_Burnarea (); + native void A_Burnination (); States { @@ -816,7 +816,7 @@ class StrifeGrenadeLauncher : StrifeWeapon Inventory.PickupMessage "$TXT_GLAUNCHER"; } - action native void A_FireGrenade (class grenadetype, float angleofs, state flash); + native void A_FireGrenade (class grenadetype, float angleofs, state flash); States { diff --git a/wadsrc/static/zscript/strife/templar.txt b/wadsrc/static/zscript/strife/templar.txt index 4c640fd54..5b1605cf4 100644 --- a/wadsrc/static/zscript/strife/templar.txt +++ b/wadsrc/static/zscript/strife/templar.txt @@ -25,7 +25,7 @@ class Templar : Actor Obituary "$OB_TEMPLAR"; DropItem "EnergyPod"; } - action native void A_TemplarAttack(); + native void A_TemplarAttack(); States { diff --git a/wadsrc/static/zscript/strife/thingstoblowup.txt b/wadsrc/static/zscript/strife/thingstoblowup.txt index 659c13f56..dbbad8ed6 100644 --- a/wadsrc/static/zscript/strife/thingstoblowup.txt +++ b/wadsrc/static/zscript/strife/thingstoblowup.txt @@ -121,9 +121,9 @@ class PowerCrystal : Actor ActiveSound "misc/reactor"; } - action native void A_ExtraLightOff (); - action native void A_Explode512 (); - action native void A_LightGoesOut (); + native void A_ExtraLightOff (); + native void A_Explode512 (); + native void A_LightGoesOut (); States {