mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom into zdoom-rgb666-take3
This commit is contained in:
commit
4e100fc9a1
15 changed files with 33 additions and 20 deletions
|
@ -1454,10 +1454,11 @@ enum CM_Flags
|
||||||
CMF_OFFSETPITCH = 32,
|
CMF_OFFSETPITCH = 32,
|
||||||
CMF_SAVEPITCH = 64,
|
CMF_SAVEPITCH = 64,
|
||||||
|
|
||||||
CMF_ABSOLUTEANGLE = 128
|
CMF_ABSOLUTEANGLE = 128,
|
||||||
|
CMF_BADPITCH = 256
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION(AActor, A_CustomMissile)
|
DEFINE_ACTION_FUNCTION(AActor, A_SpawnProjectile)
|
||||||
{
|
{
|
||||||
PARAM_SELF_PROLOGUE(AActor);
|
PARAM_SELF_PROLOGUE(AActor);
|
||||||
PARAM_CLASS (ti, AActor);
|
PARAM_CLASS (ti, AActor);
|
||||||
|
@ -1525,6 +1526,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CustomMissile)
|
||||||
}
|
}
|
||||||
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
missilespeed = fabs(Pitch.Cos() * missile->Speed);
|
||||||
missile->Vel.Z = Pitch.Sin() * missile->Speed;
|
missile->Vel.Z = Pitch.Sin() * missile->Speed;
|
||||||
|
if (!(flags & CMF_BADPITCH)) missile->Vel.Z *= -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1831,7 +1833,7 @@ static void AimBulletMissile(AActor *proj, AActor *puff, int flags, bool temp, b
|
||||||
// Aim for the base of the puff as that's where blood puffs will spawn... roughly.
|
// Aim for the base of the puff as that's where blood puffs will spawn... roughly.
|
||||||
|
|
||||||
A_Face(proj, puff, 0., 0., 0., 0., 1);
|
A_Face(proj, puff, 0., 0., 0., 0., 1);
|
||||||
proj->Vel3DFromAngle(-proj->Angles.Pitch, proj->Speed);
|
proj->Vel3DFromAngle(proj->Angles.Pitch, proj->Speed);
|
||||||
|
|
||||||
if (!temp)
|
if (!temp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6321,7 +6321,7 @@ bool P_CheckMissileSpawn (AActor* th, double maxdist)
|
||||||
// [RH] Don't explode ripping missiles that spawn inside something
|
// [RH] Don't explode ripping missiles that spawn inside something
|
||||||
if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP))
|
if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP))
|
||||||
{
|
{
|
||||||
// If this is a monster spawned by A_CustomMissile subtract it from the counter.
|
// If this is a monster spawned by A_SpawnProjectile subtract it from the counter.
|
||||||
th->ClearCounters();
|
th->ClearCounters();
|
||||||
// [RH] Don't explode missiles that spawn on top of horizon lines
|
// [RH] Don't explode missiles that spawn on top of horizon lines
|
||||||
if (th->BlockingLine != NULL && th->BlockingLine->special == Line_Horizon)
|
if (th->BlockingLine != NULL && th->BlockingLine->special == Line_Horizon)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#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"
|
||||||
|
|
|
@ -691,7 +691,7 @@ class Actor : Thinker native
|
||||||
deprecated native void A_StopSoundEx(name slot);
|
deprecated native void A_StopSoundEx(name slot);
|
||||||
native void A_SeekerMissile(int threshold, int turnmax, int flags = 0, int chance = 50, int distance = 10);
|
native void A_SeekerMissile(int threshold, int turnmax, int flags = 0, int chance = 50, int distance = 10);
|
||||||
native action state A_Jump(int chance, statelabel label, ...);
|
native action state A_Jump(int chance, statelabel label, ...);
|
||||||
native void A_CustomMissile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET);
|
native void A_SpawnProjectile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET);
|
||||||
native void A_CustomBulletAttack(double spread_xy, double spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", double range = 0, int flags = 0, int ptr = AAPTR_TARGET, class<Actor> missile = null, double Spawnheight = 32, double Spawnofs_xy = 0);
|
native void A_CustomBulletAttack(double spread_xy, double spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", double range = 0, int flags = 0, int ptr = AAPTR_TARGET, class<Actor> missile = null, double Spawnheight = 32, double Spawnofs_xy = 0);
|
||||||
native void A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = 0, color color2 = 0, int flags = 0, int aim = 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 = null, double spawnofs_z = 0, int spiraloffset = 270, int limit = 0);
|
native void A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = 0, color color2 = 0, int flags = 0, int aim = 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 = null, double spawnofs_z = 0, int spiraloffset = 270, int limit = 0);
|
||||||
native bool A_SetInventory(class<Inventory> itemtype, int amount, int ptr = AAPTR_DEFAULT, bool beyondMax = false);
|
native bool A_SetInventory(class<Inventory> itemtype, int amount, int ptr = AAPTR_DEFAULT, bool beyondMax = false);
|
||||||
|
|
9
wadsrc/static/zscript/compatibility.txt
Normal file
9
wadsrc/static/zscript/compatibility.txt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// This file contains compatibility wrappers for DECORATE functions with bad parameters.
|
||||||
|
|
||||||
|
extend class Actor
|
||||||
|
{
|
||||||
|
deprecated void A_CustomMissile(class<Actor> missiletype, double spawnheight = 32, double spawnofs_xy = 0, double angle = 0, int flags = 0, double pitch = 0, int ptr = AAPTR_TARGET)
|
||||||
|
{
|
||||||
|
A_SpawnProjectile(missiletype, spawnheight, spawnofs_xy, angle, flags|CMF_BADPITCH, pitch, ptr);
|
||||||
|
}
|
||||||
|
}
|
|
@ -45,7 +45,7 @@ enum EBFGSprayFlags
|
||||||
BFGF_MISSILEORIGIN = 2,
|
BFGF_MISSILEORIGIN = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flags for A_CustomMissile
|
// Flags for A_SpawnProjectile
|
||||||
enum ECustomMissileFlags
|
enum ECustomMissileFlags
|
||||||
{
|
{
|
||||||
CMF_AIMOFFSET = 1,
|
CMF_AIMOFFSET = 1,
|
||||||
|
@ -56,6 +56,7 @@ enum ECustomMissileFlags
|
||||||
CMF_OFFSETPITCH = 32,
|
CMF_OFFSETPITCH = 32,
|
||||||
CMF_SAVEPITCH = 64,
|
CMF_SAVEPITCH = 64,
|
||||||
CMF_ABSOLUTEANGLE = 128,
|
CMF_ABSOLUTEANGLE = 128,
|
||||||
|
CMF_BADPITCH = 256, // for compatibility handling only - avoid!
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flags for A_CustomBulletAttack
|
// Flags for A_CustomBulletAttack
|
||||||
|
|
|
@ -28,9 +28,9 @@ class Snake : Actor
|
||||||
Loop;
|
Loop;
|
||||||
Missile:
|
Missile:
|
||||||
SNKE FF 5 A_FaceTarget;
|
SNKE FF 5 A_FaceTarget;
|
||||||
SNKE FFF 4 A_CustomMissile("SnakeProjA", 32, 0, 0, CMF_CHECKTARGETDEAD);
|
SNKE FFF 4 A_SpawnProjectile("SnakeProjA", 32, 0, 0, CMF_CHECKTARGETDEAD);
|
||||||
SNKE FFF 5 A_FaceTarget;
|
SNKE FFF 5 A_FaceTarget;
|
||||||
SNKE F 4 A_CustomMissile("SnakeProjB", 32, 0, 0, CMF_CHECKTARGETDEAD);
|
SNKE F 4 A_SpawnProjectile("SnakeProjB", 32, 0, 0, CMF_CHECKTARGETDEAD);
|
||||||
Goto See;
|
Goto See;
|
||||||
Pain:
|
Pain:
|
||||||
SNKE E 3;
|
SNKE E 3;
|
||||||
|
|
|
@ -112,9 +112,9 @@ class CentaurLeader : Centaur
|
||||||
{
|
{
|
||||||
Missile:
|
Missile:
|
||||||
CENT E 10 A_FaceTarget;
|
CENT E 10 A_FaceTarget;
|
||||||
CENT F 8 Bright A_CustomMissile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET);
|
CENT F 8 Bright A_SpawnProjectile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET);
|
||||||
CENT E 10 A_FaceTarget;
|
CENT E 10 A_FaceTarget;
|
||||||
CENT F 8 Bright A_CustomMissile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET);
|
CENT F 8 Bright A_SpawnProjectile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET);
|
||||||
Goto See;
|
Goto See;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Demon1 : Actor
|
||||||
Missile:
|
Missile:
|
||||||
DEMN E 5 A_FaceTarget;
|
DEMN E 5 A_FaceTarget;
|
||||||
DEMN F 6 A_FaceTarget;
|
DEMN F 6 A_FaceTarget;
|
||||||
DEMN G 5 A_CustomMissile("Demon1FX1", 62, 0);
|
DEMN G 5 A_SpawnProjectile("Demon1FX1", 62, 0);
|
||||||
Goto See;
|
Goto See;
|
||||||
Death:
|
Death:
|
||||||
DEMN HI 6;
|
DEMN HI 6;
|
||||||
|
@ -250,7 +250,7 @@ class Demon2 : Demon1
|
||||||
Missile:
|
Missile:
|
||||||
DEM2 E 5 A_FaceTarget;
|
DEM2 E 5 A_FaceTarget;
|
||||||
DEM2 F 6 A_FaceTarget;
|
DEM2 F 6 A_FaceTarget;
|
||||||
DEM2 G 5 A_CustomMissile("Demon2FX1", 62, 0);
|
DEM2 G 5 A_SpawnProjectile("Demon2FX1", 62, 0);
|
||||||
Goto See;
|
Goto See;
|
||||||
Death:
|
Death:
|
||||||
DEM2 HI 6;
|
DEM2 HI 6;
|
||||||
|
|
|
@ -300,7 +300,7 @@ class SerpentLeader : Serpent
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
Missile:
|
Missile:
|
||||||
SSPT N 5 A_CustomMissile("SerpentFX", 32, 0);
|
SSPT N 5 A_SpawnProjectile("SerpentFX", 32, 0);
|
||||||
Goto Dive;
|
Goto Dive;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Wraith : Actor
|
||||||
Missile:
|
Missile:
|
||||||
WRTH E 6 A_FaceTarget;
|
WRTH E 6 A_FaceTarget;
|
||||||
WRTH F 6;
|
WRTH F 6;
|
||||||
WRTH G 6 A_CustomMissile("WraithFX1");
|
WRTH G 6 A_SpawnProjectile("WraithFX1");
|
||||||
Goto See;
|
Goto See;
|
||||||
Death:
|
Death:
|
||||||
WRTH I 4;
|
WRTH I 4;
|
||||||
|
|
|
@ -202,7 +202,7 @@ class AlienSpectre2 : AlienSpectre1
|
||||||
{
|
{
|
||||||
Missile:
|
Missile:
|
||||||
ALN1 F 4 A_FaceTarget;
|
ALN1 F 4 A_FaceTarget;
|
||||||
ALN1 I 4 A_CustomMissile("SpectralLightningH3", 32, 0);
|
ALN1 I 4 A_SpawnProjectile("SpectralLightningH3", 32, 0);
|
||||||
ALN1 E 4;
|
ALN1 E 4;
|
||||||
Goto See+10;
|
Goto See+10;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ class AlienSpectre4 : AlienSpectre1
|
||||||
{
|
{
|
||||||
Missile:
|
Missile:
|
||||||
ALN1 F 4 A_FaceTarget;
|
ALN1 F 4 A_FaceTarget;
|
||||||
ALN1 I 4 A_CustomMissile("SpectralLightningBigV2", 32, 0);
|
ALN1 I 4 A_SpawnProjectile("SpectralLightningBigV2", 32, 0);
|
||||||
ALN1 E 4;
|
ALN1 E 4;
|
||||||
Goto See+10;
|
Goto See+10;
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ class AlienSpectre5 : AlienSpectre1
|
||||||
{
|
{
|
||||||
Missile:
|
Missile:
|
||||||
ALN1 F 4 A_FaceTarget;
|
ALN1 F 4 A_FaceTarget;
|
||||||
ALN1 I 4 A_CustomMissile("SpectralLightningBigBall2", 32, 0);
|
ALN1 I 4 A_SpawnProjectile("SpectralLightningBigBall2", 32, 0);
|
||||||
ALN1 E 4;
|
ALN1 E 4;
|
||||||
Goto See+10;
|
Goto See+10;
|
||||||
}
|
}
|
||||||
|
|
|
@ -265,7 +265,7 @@ class EntitySecond : SpectralMonster
|
||||||
Goto See+1;
|
Goto See+1;
|
||||||
Missile:
|
Missile:
|
||||||
MNAL W 4 Bright A_FaceTarget;
|
MNAL W 4 Bright A_FaceTarget;
|
||||||
MNAL U 4 Bright A_CustomMissile("SpectralLightningH3",32,0);
|
MNAL U 4 Bright A_SpawnProjectile("SpectralLightningH3",32,0);
|
||||||
MNAL V 4 Bright A_SentinelBob;
|
MNAL V 4 Bright A_SentinelBob;
|
||||||
Goto See+4;
|
Goto See+4;
|
||||||
Pain:
|
Pain:
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Loremaster : Actor
|
||||||
Goto See;
|
Goto See;
|
||||||
Missile:
|
Missile:
|
||||||
PRST E 4 A_FaceTarget;
|
PRST E 4 A_FaceTarget;
|
||||||
PRST F 4 A_CustomMissile("LoreShot", 32, 0);
|
PRST F 4 A_SpawnProjectile("LoreShot", 32, 0);
|
||||||
PRST E 4 A_SentinelBob;
|
PRST E 4 A_SentinelBob;
|
||||||
Goto See;
|
Goto See;
|
||||||
Death:
|
Death:
|
||||||
|
|
|
@ -38,7 +38,7 @@ class StrifeBishop : Actor
|
||||||
Loop;
|
Loop;
|
||||||
Missile:
|
Missile:
|
||||||
MLDR E 3 A_FaceTarget;
|
MLDR E 3 A_FaceTarget;
|
||||||
MLDR F 2 Bright A_CustomMissile("BishopMissile", 64, 0, 0, CMF_AIMOFFSET);
|
MLDR F 2 Bright A_SpawnProjectile("BishopMissile", 64, 0, 0, CMF_AIMOFFSET);
|
||||||
Goto See;
|
Goto See;
|
||||||
Pain:
|
Pain:
|
||||||
MLDR D 1 A_Pain;
|
MLDR D 1 A_Pain;
|
||||||
|
|
Loading…
Reference in a new issue