- renamed A_FireCustomMissile and added a deprecated compatibility wrapper to deal with the inverted pitch this function used.

This commit is contained in:
Christoph Oelckers 2016-12-24 16:34:45 +01:00
parent b807f50bde
commit 287974968a
8 changed files with 21 additions and 11 deletions

View File

@ -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);

View File

@ -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"

View File

@ -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;
}

View File

@ -6,4 +6,13 @@ extend class Actor
{
A_SpawnProjectile(missiletype, spawnheight, spawnofs_xy, angle, flags|CMF_BADPITCH, pitch, ptr);
}
}
}
extend class StateProvider
{
deprecated action void A_FireCustomMissile(class<Actor> 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);
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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<Actor> pufftype = "BulletPuff", double range = 0, double lifesteal = 0, int lifestealmax = 0, class<BasicArmorBonus> armorbonustype = "ArmorBonus", sound MeleeSound = 0, sound MissSound = "");
action native void A_FireBullets(double spread_xy, double spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", int flags = 1, double range = 0, class<Actor> missile = null, double Spawnheight = 32, double Spawnofs_xy = 0);
action native void A_FireCustomMissile(class<Actor> 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<Actor> 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<Actor> 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<Actor> 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();