mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- renamed A_FireCustomMissile and added a deprecated compatibility wrapper to deal with the inverted pitch this function used.
This commit is contained in:
parent
b807f50bde
commit
287974968a
8 changed files with 21 additions and 11 deletions
|
@ -1988,7 +1988,7 @@ enum FP_Flags
|
||||||
FPF_TRANSFERTRANSLATION = 2,
|
FPF_TRANSFERTRANSLATION = 2,
|
||||||
FPF_NOAUTOAIM = 4,
|
FPF_NOAUTOAIM = 4,
|
||||||
};
|
};
|
||||||
DEFINE_ACTION_FUNCTION(AStateProvider, A_FireCustomMissile)
|
DEFINE_ACTION_FUNCTION(AStateProvider, A_FireProjectile)
|
||||||
{
|
{
|
||||||
PARAM_ACTION_PROLOGUE(AStateProvider);
|
PARAM_ACTION_PROLOGUE(AStateProvider);
|
||||||
PARAM_CLASS (ti, AActor);
|
PARAM_CLASS (ti, AActor);
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "zscript/constants.txt"
|
#include "zscript/constants.txt"
|
||||||
#include "zscript/actor.txt"
|
#include "zscript/actor.txt"
|
||||||
#include "zscript/actor_checks.txt"
|
#include "zscript/actor_checks.txt"
|
||||||
#include "zscript/compatibility.txt"
|
|
||||||
|
|
||||||
#include "zscript/shared/inventory.txt"
|
#include "zscript/shared/inventory.txt"
|
||||||
#include "zscript/shared/inv_misc.txt"
|
#include "zscript/shared/inv_misc.txt"
|
||||||
|
@ -38,6 +37,8 @@
|
||||||
#include "zscript/shared/dog.txt"
|
#include "zscript/shared/dog.txt"
|
||||||
#include "zscript/shared/fastprojectile.txt"
|
#include "zscript/shared/fastprojectile.txt"
|
||||||
|
|
||||||
|
#include "zscript/compatibility.txt"
|
||||||
|
|
||||||
#include "zscript/doom/doomplayer.txt"
|
#include "zscript/doom/doomplayer.txt"
|
||||||
#include "zscript/doom/possessed.txt"
|
#include "zscript/doom/possessed.txt"
|
||||||
#include "zscript/doom/doomimp.txt"
|
#include "zscript/doom/doomimp.txt"
|
||||||
|
|
|
@ -77,7 +77,7 @@ class ZorchPropulsor : RocketLauncher
|
||||||
{
|
{
|
||||||
Fire:
|
Fire:
|
||||||
MISG B 8 A_GunFlash;
|
MISG B 8 A_GunFlash;
|
||||||
MISG B 12 A_FireCustomMissile("PropulsorMissile");
|
MISG B 12 A_FireProjectile("PropulsorMissile");
|
||||||
MISG B 0 A_ReFire;
|
MISG B 0 A_ReFire;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ class PhasingZorcher : PlasmaRifle
|
||||||
{
|
{
|
||||||
Fire:
|
Fire:
|
||||||
PLSG A 0 A_GunFlash;
|
PLSG A 0 A_GunFlash;
|
||||||
PLSG A 3 A_FireCustomMissile("PhaseZorchMissile");
|
PLSG A 3 A_FireProjectile("PhaseZorchMissile");
|
||||||
PLSG B 20 A_ReFire;
|
PLSG B 20 A_ReFire;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
Flash:
|
Flash:
|
||||||
|
@ -143,7 +143,7 @@ class LAZDevice : BFG9000
|
||||||
Fire:
|
Fire:
|
||||||
BFGG A 20 A_BFGsound;
|
BFGG A 20 A_BFGsound;
|
||||||
BFGG B 10 A_GunFlash;
|
BFGG B 10 A_GunFlash;
|
||||||
BFGG B 10 A_FireCustomMissile("LAZBall");
|
BFGG B 10 A_FireProjectile("LAZBall");
|
||||||
BFGG B 20 A_ReFire;
|
BFGG B 20 A_ReFire;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,4 +6,13 @@ extend class Actor
|
||||||
{
|
{
|
||||||
A_SpawnProjectile(missiletype, spawnheight, spawnofs_xy, angle, flags|CMF_BADPITCH, pitch, ptr);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class BlasterPowered : Blaster
|
||||||
Fire:
|
Fire:
|
||||||
BLSR BC 0;
|
BLSR BC 0;
|
||||||
Hold:
|
Hold:
|
||||||
BLSR D 3 A_FireCustomMissile("BlasterFX1");
|
BLSR D 3 A_FireProjectile("BlasterFX1");
|
||||||
BLSR CB 4;
|
BLSR CB 4;
|
||||||
BLSR A 0 A_ReFire;
|
BLSR A 0 A_ReFire;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class MWeapWand : MageWeapon
|
||||||
Loop;
|
Loop;
|
||||||
Fire:
|
Fire:
|
||||||
MWND A 6;
|
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, 40);
|
||||||
MWND A 3 Offset (0, 36) A_ReFire;
|
MWND A 3 Offset (0, 36) A_ReFire;
|
||||||
Goto Ready;
|
Goto Ready;
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ArtiEgg : CustomInventory
|
||||||
Use:
|
Use:
|
||||||
TNT1 A 0
|
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;
|
Stop;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ class ArtiPork : CustomInventory
|
||||||
Use:
|
Use:
|
||||||
TNT1 A 0
|
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;
|
Stop;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ class StateProvider : Inventory native
|
||||||
action native state A_JumpIfNoAmmo(statelabel label);
|
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_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_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_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_WeaponReady(int flags = 0);
|
||||||
action native void A_Lower();
|
action native void A_Lower();
|
||||||
|
|
Loading…
Reference in a new issue