diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index 885bb050c8..202668c36b 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -1988,7 +1988,7 @@ enum FP_Flags FPF_TRANSFERTRANSLATION = 2, FPF_NOAUTOAIM = 4, }; -DEFINE_ACTION_FUNCTION(AStateProvider, A_FireCustomMissile) +DEFINE_ACTION_FUNCTION(AStateProvider, A_FireProjectile) { PARAM_ACTION_PROLOGUE(AStateProvider); PARAM_CLASS (ti, AActor); diff --git a/wadsrc/static/zscript.txt b/wadsrc/static/zscript.txt index 3cad697833..24fd1b0689 100644 --- a/wadsrc/static/zscript.txt +++ b/wadsrc/static/zscript.txt @@ -2,7 +2,6 @@ #include "zscript/constants.txt" #include "zscript/actor.txt" #include "zscript/actor_checks.txt" -#include "zscript/compatibility.txt" #include "zscript/shared/inventory.txt" #include "zscript/shared/inv_misc.txt" @@ -38,6 +37,8 @@ #include "zscript/shared/dog.txt" #include "zscript/shared/fastprojectile.txt" +#include "zscript/compatibility.txt" + #include "zscript/doom/doomplayer.txt" #include "zscript/doom/possessed.txt" #include "zscript/doom/doomimp.txt" diff --git a/wadsrc/static/zscript/chex/chexweapons.txt b/wadsrc/static/zscript/chex/chexweapons.txt index a4c862d64c..5bf6fe7575 100644 --- a/wadsrc/static/zscript/chex/chexweapons.txt +++ b/wadsrc/static/zscript/chex/chexweapons.txt @@ -77,7 +77,7 @@ class ZorchPropulsor : RocketLauncher { Fire: MISG B 8 A_GunFlash; - MISG B 12 A_FireCustomMissile("PropulsorMissile"); + MISG B 12 A_FireProjectile("PropulsorMissile"); MISG B 0 A_ReFire; Goto Ready; } @@ -107,7 +107,7 @@ class PhasingZorcher : PlasmaRifle { Fire: PLSG A 0 A_GunFlash; - PLSG A 3 A_FireCustomMissile("PhaseZorchMissile"); + PLSG A 3 A_FireProjectile("PhaseZorchMissile"); PLSG B 20 A_ReFire; Goto Ready; Flash: @@ -143,7 +143,7 @@ class LAZDevice : BFG9000 Fire: BFGG A 20 A_BFGsound; BFGG B 10 A_GunFlash; - BFGG B 10 A_FireCustomMissile("LAZBall"); + BFGG B 10 A_FireProjectile("LAZBall"); BFGG B 20 A_ReFire; Goto Ready; } diff --git a/wadsrc/static/zscript/compatibility.txt b/wadsrc/static/zscript/compatibility.txt index 771e3b44b5..9334bd6196 100644 --- a/wadsrc/static/zscript/compatibility.txt +++ b/wadsrc/static/zscript/compatibility.txt @@ -6,4 +6,13 @@ extend class Actor { A_SpawnProjectile(missiletype, spawnheight, spawnofs_xy, angle, flags|CMF_BADPITCH, pitch, ptr); } -} \ No newline at end of file +} + +extend class StateProvider +{ + deprecated action void A_FireCustomMissile(class missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0) + { + A_FireProjectile(missiletype, angle, useammo, spawnofs_xy, spawnheight, flags, -pitch); + } +} + diff --git a/wadsrc/static/zscript/heretic/weaponblaster.txt b/wadsrc/static/zscript/heretic/weaponblaster.txt index 8f4756b5b6..612e630c0b 100644 --- a/wadsrc/static/zscript/heretic/weaponblaster.txt +++ b/wadsrc/static/zscript/heretic/weaponblaster.txt @@ -87,7 +87,7 @@ class BlasterPowered : Blaster Fire: BLSR BC 0; Hold: - BLSR D 3 A_FireCustomMissile("BlasterFX1"); + BLSR D 3 A_FireProjectile("BlasterFX1"); BLSR CB 4; BLSR A 0 A_ReFire; Goto Ready; diff --git a/wadsrc/static/zscript/hexen/magewand.txt b/wadsrc/static/zscript/hexen/magewand.txt index 3feb96ae16..9157bdba12 100644 --- a/wadsrc/static/zscript/hexen/magewand.txt +++ b/wadsrc/static/zscript/hexen/magewand.txt @@ -23,7 +23,7 @@ class MWeapWand : MageWeapon Loop; Fire: MWND A 6; - MWND B 6 Bright Offset (0, 48) A_FireCustomMissile ("MageWandMissile"); + MWND B 6 Bright Offset (0, 48) A_FireProjectile ("MageWandMissile"); MWND A 3 Offset (0, 40); MWND A 3 Offset (0, 36) A_ReFire; Goto Ready; diff --git a/wadsrc/static/zscript/raven/artiegg.txt b/wadsrc/static/zscript/raven/artiegg.txt index f0287048ec..a51e2e1f5d 100644 --- a/wadsrc/static/zscript/raven/artiegg.txt +++ b/wadsrc/static/zscript/raven/artiegg.txt @@ -49,7 +49,7 @@ class ArtiEgg : CustomInventory Use: TNT1 A 0 { - for (double i = -15; i <= 15; i += 7.5) A_FireCustomMissile("EggFX", i, 0, 0, 0, 1); + for (double i = -15; i <= 15; i += 7.5) A_FireProjectile("EggFX", i, false, 0, 0, FPF_AIMATANGLE); } Stop; } @@ -104,7 +104,7 @@ class ArtiPork : CustomInventory Use: TNT1 A 0 { - for (double i = -15; i <= 15; i += 7.5) A_FireCustomMissile("PorkFX", i, 0, 0, 0, 1); + for (double i = -15; i <= 15; i += 7.5) A_FireProjectile("PorkFX", i, false, 0, 0, FPF_AIMATANGLE); } Stop; } diff --git a/wadsrc/static/zscript/shared/inventory.txt b/wadsrc/static/zscript/shared/inventory.txt index 06e4d75525..6d034e7894 100644 --- a/wadsrc/static/zscript/shared/inventory.txt +++ b/wadsrc/static/zscript/shared/inventory.txt @@ -84,7 +84,7 @@ class StateProvider : Inventory native action native state A_JumpIfNoAmmo(statelabel label); action native void A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class pufftype = "BulletPuff", double range = 0, double lifesteal = 0, int lifestealmax = 0, class armorbonustype = "ArmorBonus", sound MeleeSound = 0, sound MissSound = ""); action native void A_FireBullets(double spread_xy, double spread_z, int numbullets, int damageperbullet, class pufftype = "BulletPuff", int flags = 1, double range = 0, class missile = null, double Spawnheight = 32, double Spawnofs_xy = 0); - action native void A_FireCustomMissile(class missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0); + action native void A_FireProjectile(class missiletype, double angle = 0, bool useammo = true, double spawnofs_xy = 0, double spawnheight = 0, int flags = 0, double pitch = 0); action native void A_RailAttack(int damage, int spawnofs_xy = 0, bool useammo = true, color color1 = 0, color color2 = 0, int flags = 0, double maxdiff = 0, class pufftype = "BulletPuff", double spread_xy = 0, double spread_z = 0, double range = 0, int duration = 0, double sparsity = 1.0, double driftspeed = 1.0, class spawnclass = "none", double spawnofs_z = 0, int spiraloffset = 270, int limit = 0); action native void A_WeaponReady(int flags = 0); action native void A_Lower();