mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
commit
42c1ff2310
4 changed files with 5248 additions and 5111 deletions
|
@ -546,6 +546,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FireBFG)
|
|||
P_SpawnPlayerMissile (self, 0, 0, 0, PClass::FindClass("BFGBall"), self->angle, NULL, NULL, !!(dmflags2 & DF2_NO_FREEAIMBFG));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// A_BFGSpray
|
||||
// Spawn a BFG explosion on every monster in view
|
||||
|
@ -559,14 +560,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray)
|
|||
AActor *thingToHit;
|
||||
AActor *linetarget;
|
||||
|
||||
ACTION_PARAM_START(3);
|
||||
ACTION_PARAM_START(7);
|
||||
ACTION_PARAM_CLASS(spraytype, 0);
|
||||
ACTION_PARAM_INT(numrays, 1);
|
||||
ACTION_PARAM_INT(damagecnt, 2);
|
||||
ACTION_PARAM_ANGLE(angle, 3);
|
||||
ACTION_PARAM_FIXED(distance, 4);
|
||||
ACTION_PARAM_ANGLE(vrange, 5);
|
||||
ACTION_PARAM_INT(defdamage, 6);
|
||||
|
||||
if (spraytype == NULL) spraytype = PClass::FindClass("BFGExtra");
|
||||
if (numrays <= 0) numrays = 40;
|
||||
if (damagecnt <= 0) damagecnt = 15;
|
||||
if (angle == 0) angle = ANG90;
|
||||
if (distance <= 0) distance = 16 * 64 * FRACUNIT;
|
||||
if (vrange == 0) vrange = ANGLE_1 * 32;
|
||||
|
||||
// [RH] Don't crash if no target
|
||||
if (!self->target)
|
||||
|
@ -575,10 +583,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray)
|
|||
// offset angles from its attack angle
|
||||
for (i = 0; i < numrays; i++)
|
||||
{
|
||||
an = self->angle - ANG90/2 + ANG90/numrays*i;
|
||||
an = self->angle - angle/2 + angle/numrays*i;
|
||||
|
||||
// self->target is the originator (player) of the missile
|
||||
P_AimLineAttack (self->target, an, 16*64*FRACUNIT, &linetarget, ANGLE_1*32);
|
||||
P_AimLineAttack (self->target, an, distance, &linetarget, vrange);
|
||||
|
||||
if (!linetarget)
|
||||
continue;
|
||||
|
@ -589,10 +597,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray)
|
|||
if (spray && (spray->flags5 & MF5_PUFFGETSOWNER))
|
||||
spray->target = self->target;
|
||||
|
||||
|
||||
damage = 0;
|
||||
for (j = 0; j < damagecnt; ++j)
|
||||
damage += (pr_bfgspray() & 7) + 1;
|
||||
if (defdamage == 0)
|
||||
{
|
||||
damage = 0;
|
||||
for (j = 0; j < damagecnt; ++j)
|
||||
damage += (pr_bfgspray() & 7) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if this is used, damagecnt will be ignored
|
||||
damage = defdamage;
|
||||
}
|
||||
|
||||
thingToHit = linetarget;
|
||||
int newdam = P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash),
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -70,7 +70,7 @@ ACTOR Actor native //: Thinker
|
|||
// End of MBF redundant functions.
|
||||
|
||||
action native A_MonsterRail();
|
||||
action native A_BFGSpray(class<Actor> spraytype = "BFGExtra", int numrays = 40, int damagecount = 15);
|
||||
action native A_BFGSpray(class<Actor> spraytype = "BFGExtra", int numrays = 40, int damagecount = 15, float angle = 90, float distance = 16*64, float vrange = 32, int damage = 0);
|
||||
action native A_Pain();
|
||||
action native A_NoBlocking();
|
||||
action native A_XScream();
|
||||
|
@ -204,7 +204,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_CustomMissile(class<Actor> missiletype, float spawnheight = 32, int spawnofs_xy = 0, float angle = 0, int flags = 0, float pitch = 0);
|
||||
action native A_CustomBulletAttack(float spread_xy, float spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", float range = 0, int flags = 0);
|
||||
action native A_CustomRailgun(int damage, int spawnofs_xy = 0, color color1 = "", color color2 = "", int flags = 0, bool aim = false, float maxdiff = 0, class<Actor> 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<Actor> spawnclass = "none", float spawnofs_z = 0);
|
||||
action native A_JumpIfHealthLower(int health, state label);
|
||||
action native A_JumpIfHealthLower(int health, state label, int ptr_selector = AAPTR_DEFAULT);
|
||||
action native A_JumpIfCloser(float distance, state label);
|
||||
action native A_JumpIfTracerCloser(float distance, state label);
|
||||
action native A_JumpIfMasterCloser(float distance, state label);
|
||||
|
@ -237,9 +237,9 @@ ACTOR Actor native //: Thinker
|
|||
action native A_RemoveMaster();
|
||||
action native A_RemoveChildren(bool removeall = false);
|
||||
action native A_RemoveSiblings(bool removeall = false);
|
||||
action native A_KillMaster(name damagetype = "none");
|
||||
action native A_KillChildren(name damagetype = "none");
|
||||
action native A_KillSiblings(name damagetype = "none");
|
||||
action native A_KillMaster(name damagetype = "none", int flags = 0);
|
||||
action native A_KillChildren(name damagetype = "none", int flags = 0);
|
||||
action native A_KillSiblings(name damagetype = "none", int flags = 0);
|
||||
action native A_RaiseMaster();
|
||||
action native A_RaiseChildren();
|
||||
action native A_RaiseSiblings();
|
||||
|
@ -275,9 +275,9 @@ ACTOR Actor native //: Thinker
|
|||
action native 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);
|
||||
action native A_JumpIfTargetInLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0);
|
||||
action native A_JumpIfInTargetLOS (state label, float fov = 0, int flags = 0, float dist_max = 0, float dist_close = 0);
|
||||
action native A_DamageMaster(int amount, name damagetype = "none");
|
||||
action native A_DamageChildren(int amount, name damagetype = "none");
|
||||
action native A_DamageSiblings(int amount, name damagetype = "none");
|
||||
action native A_DamageMaster(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_DamageChildren(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_DamageSiblings(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_SelectWeapon(class<Weapon> whichweapon);
|
||||
action native A_Punch();
|
||||
action native A_Feathers();
|
||||
|
@ -304,9 +304,13 @@ ACTOR Actor native //: Thinker
|
|||
action native A_SetDamageType(name damagetype);
|
||||
action native A_DropItem(class<Actor> item, int dropamount = -1, int chance = 256);
|
||||
action native A_SetSpeed(float speed);
|
||||
action native A_DamageSelf(int amount, name damagetype = "none");
|
||||
action native A_DamageTarget(int amount, name damagetype = "none");
|
||||
action native A_DamageTracer(int amount, name damagetype = "none");
|
||||
action native A_DamageSelf(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_DamageTarget(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_DamageTracer(int amount, name damagetype = "none", int flags = 0);
|
||||
action native A_KillTarget(name damagetype = "none", int flags = 0);
|
||||
action native A_KillTracer(name damagetype = "none", int flags = 0);
|
||||
action native A_RemoveTarget();
|
||||
action native A_RemoveTracer();
|
||||
|
||||
action native A_CheckSightOrRange(float distance, state label);
|
||||
action native A_CheckRange(float distance, state label);
|
||||
|
|
|
@ -46,27 +46,30 @@ const int FBF_NOFLASH = 16;
|
|||
const int FBF_NORANDOMPUFFZ = 32;
|
||||
|
||||
// Flags for A_SpawnItemEx
|
||||
const int SXF_TRANSFERTRANSLATION = 1;
|
||||
const int SXF_ABSOLUTEPOSITION = 2;
|
||||
const int SXF_ABSOLUTEANGLE = 4;
|
||||
const int SXF_ABSOLUTEMOMENTUM = 8;
|
||||
const int SXF_ABSOLUTEVELOCITY = 8;
|
||||
const int SXF_SETMASTER = 16;
|
||||
const int SXF_NOCHECKPOSITION = 32;
|
||||
const int SXF_TELEFRAG = 64;
|
||||
const int SXF_CLIENTSIDE = 128; // only used by Skulltag
|
||||
const int SXF_TRANSFERAMBUSHFLAG = 256;
|
||||
const int SXF_TRANSFERPITCH = 512;
|
||||
const int SXF_TRANSFERPOINTERS = 1024;
|
||||
const int SXF_USEBLOODCOLOR = 2048;
|
||||
const int SXF_CLEARCALLERTID = 4096;
|
||||
const int SXF_MULTIPLYSPEED = 8192;
|
||||
const int SXF_TRANSFERSCALE = 16384;
|
||||
const int SXF_TRANSFERSPECIAL = 32768;
|
||||
const int SXF_CLEARCALLERSPECIAL = 65536;
|
||||
const int SXF_TRANSFERSTENCILCOL = 131072;
|
||||
const int SXF_TRANSFERALPHA = 262144;
|
||||
const int SXF_TRANSFERRENDERSTYLE = 524288;
|
||||
const int SXF_TRANSFERTRANSLATION = 1 << 0;
|
||||
const int SXF_ABSOLUTEPOSITION = 1 << 1;
|
||||
const int SXF_ABSOLUTEANGLE = 1 << 2;
|
||||
const int SXF_ABSOLUTEMOMENTUM = 1 << 3; //Since "momentum" is declared to be deprecated in the expressions, for compatibility
|
||||
const int SXF_ABSOLUTEVELOCITY = 1 << 3; //purposes, this was made. It does the same thing though. Do not change the value.
|
||||
const int SXF_SETMASTER = 1 << 4;
|
||||
const int SXF_NOCHECKPOSITION = 1 << 5;
|
||||
const int SXF_TELEFRAG = 1 << 6;
|
||||
const int SXF_CLIENTSIDE = 1 << 7; // only used by Skulltag
|
||||
const int SXF_TRANSFERAMBUSHFLAG = 1 << 8;
|
||||
const int SXF_TRANSFERPITCH = 1 << 9;
|
||||
const int SXF_TRANSFERPOINTERS = 1 << 10;
|
||||
const int SXF_USEBLOODCOLOR = 1 << 11;
|
||||
const int SXF_CLEARCALLERTID = 1 << 12;
|
||||
const int SXF_MULTIPLYSPEED = 1 << 13;
|
||||
const int SXF_TRANSFERSCALE = 1 << 14;
|
||||
const int SXF_TRANSFERSPECIAL = 1 << 15;
|
||||
const int SXF_CLEARCALLERSPECIAL = 1 << 16;
|
||||
const int SXF_TRANSFERSTENCILCOL = 1 << 17;
|
||||
const int SXF_TRANSFERALPHA = 1 << 18;
|
||||
const int SXF_TRANSFERRENDERSTYLE = 1 << 19;
|
||||
const int SXF_SETTARGET = 1 << 20;
|
||||
const int SXF_SETTRACER = 1 << 21;
|
||||
const int SXF_NOPOINTERS = 1 << 22;
|
||||
|
||||
// Flags for A_Chase
|
||||
const int CHF_FASTCHASE = 1;
|
||||
|
@ -314,6 +317,7 @@ Const Int WARPF_COPYINTERPOLATION = 0x40;
|
|||
Const Int WARPF_STOP = 0x80;
|
||||
Const Int WARPF_TOFLOOR = 0x100;
|
||||
Const Int WARPF_TESTONLY = 0x200;
|
||||
Const Int WAPRF_ABSOLUTEPOSITION = 0x400;
|
||||
|
||||
// flags for A_SetPitch/SetAngle
|
||||
const int SPF_FORCECLAMP = 1;
|
||||
|
@ -360,6 +364,16 @@ enum
|
|||
CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
|
||||
};
|
||||
|
||||
// Flags for A_Kill (Master/Target/Tracer/Children/Siblings) series
|
||||
|
||||
const int KILS_FOILINVUL = 1;
|
||||
const int KILS_KILLMISSILES = 2;
|
||||
const int KILS_NOMONSTERS = 4;
|
||||
|
||||
// Flags for A_Damage (Master/Target/Tracer/Children/Siblings/Self) series
|
||||
const int DMSS_FOILINVUL = 1;
|
||||
const int DMSS_AFFECTARMOR = 2;
|
||||
const int DMSS_KILL = 4;
|
||||
|
||||
// Flags for A_AlertMonsters
|
||||
const int AMF_TARGETEMITTER = 1;
|
||||
|
|
Loading…
Reference in a new issue