mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Added spawnofs_z parameter to A_RailAttack and A_CustomRailgun.
SVN r4191 (trunk)
This commit is contained in:
parent
283ee1a891
commit
53e73783e0
6 changed files with 15 additions and 13 deletions
|
@ -467,7 +467,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_FirePlasma)
|
|||
//
|
||||
// [RH] A_FireRailgun
|
||||
//
|
||||
static void FireRailgun(AActor *self, int RailOffset)
|
||||
static void FireRailgun(AActor *self, int offset_xy)
|
||||
{
|
||||
int damage;
|
||||
player_t *player;
|
||||
|
@ -492,7 +492,7 @@ static void FireRailgun(AActor *self, int RailOffset)
|
|||
|
||||
damage = deathmatch ? 100 : 150;
|
||||
|
||||
P_RailAttack (self, damage, RailOffset);
|
||||
P_RailAttack (self, damage, offset_xy);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ void P_TraceBleed (int damage, AActor *target); // random direction version
|
|||
bool P_HitFloor (AActor *thing);
|
||||
bool P_HitWater (AActor *thing, sector_t *sec, fixed_t splashx = FIXED_MIN, fixed_t splashy = FIXED_MIN, fixed_t splashz=FIXED_MIN, bool checkabove = false, bool alert = true);
|
||||
void P_CheckSplash(AActor *self, fixed_t distance);
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1 = 0, int color2 = 0, float maxdiff = 0, int flags = 0, const PClass *puff = NULL, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 8192*FRACUNIT, int duration = 0, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun
|
||||
void P_RailAttack (AActor *source, int damage, int offset_xy, fixed_t offset_z = 0, int color1 = 0, int color2 = 0, float maxdiff = 0, int flags = 0, const PClass *puff = NULL, angle_t angleoffset = 0, angle_t pitchoffset = 0, fixed_t distance = 8192*FRACUNIT, int duration = 0, float sparsity = 1.0, float drift = 1.0, const PClass *spawnclass = NULL); // [RH] Shoot a railgun
|
||||
|
||||
enum // P_RailAttack / A_RailAttack / A_CustomRailgun / P_DrawRailTrail flags
|
||||
{
|
||||
|
|
|
@ -3942,7 +3942,7 @@ static bool ProcessNoPierceRailHit (FTraceResults &res)
|
|||
//
|
||||
//
|
||||
//==========================================================================
|
||||
void P_RailAttack (AActor *source, int damage, int offset, int color1, int color2, float maxdiff, int railflags, const PClass *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, float sparsity, float drift, const PClass *spawnclass)
|
||||
void P_RailAttack (AActor *source, int damage, int offset_xy, fixed_t offset_z, int color1, int color2, float maxdiff, int railflags, const PClass *puffclass, angle_t angleoffset, angle_t pitchoffset, fixed_t distance, int duration, float sparsity, float drift, const PClass *spawnclass)
|
||||
{
|
||||
fixed_t vx, vy, vz;
|
||||
angle_t angle, pitch;
|
||||
|
@ -3963,7 +3963,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
|||
x1 = source->x;
|
||||
y1 = source->y;
|
||||
|
||||
shootz = source->z - source->floorclip + (source->height >> 1);
|
||||
shootz = source->z - source->floorclip + (source->height >> 1) + offset_z;
|
||||
|
||||
if (!(railflags & RAF_CENTERZ))
|
||||
{
|
||||
|
@ -3978,8 +3978,8 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color
|
|||
}
|
||||
|
||||
angle = ((source->angle + angleoffset) - ANG90) >> ANGLETOFINESHIFT;
|
||||
x1 += offset*finecosine[angle];
|
||||
y1 += offset*finesine[angle];
|
||||
x1 += offset_xy * finecosine[angle];
|
||||
y1 += offset_xy * finesine[angle];
|
||||
|
||||
RailHits.Clear ();
|
||||
start.X = FIXED2FLOAT(x1);
|
||||
|
|
|
@ -1429,7 +1429,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
|||
//==========================================================================
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
||||
{
|
||||
ACTION_PARAM_START(15);
|
||||
ACTION_PARAM_START(16);
|
||||
ACTION_PARAM_INT(Damage, 0);
|
||||
ACTION_PARAM_INT(Spawnofs_XY, 1);
|
||||
ACTION_PARAM_BOOL(UseAmmo, 2);
|
||||
|
@ -1445,6 +1445,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
|||
ACTION_PARAM_FLOAT(Sparsity, 12);
|
||||
ACTION_PARAM_FLOAT(DriftSpeed, 13);
|
||||
ACTION_PARAM_CLASS(SpawnClass, 14);
|
||||
ACTION_PARAM_FIXED(Spawnofs_Z, 15);
|
||||
|
||||
if(Range==0) Range=8192*FRACUNIT;
|
||||
if(Sparsity==0) Sparsity=1.0;
|
||||
|
@ -1473,7 +1474,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
|
|||
slope = pr_crailgun.Random2() * (Spread_Z / 255);
|
||||
}
|
||||
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Flags, PuffType, angle, slope, Range, Duration, Sparsity, DriftSpeed, SpawnClass);
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Spawnofs_Z, Color1, Color2, MaxDiff, Flags, PuffType, angle, slope, Range, Duration, Sparsity, DriftSpeed, SpawnClass);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1491,7 +1492,7 @@ enum
|
|||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
||||
{
|
||||
ACTION_PARAM_START(15);
|
||||
ACTION_PARAM_START(16);
|
||||
ACTION_PARAM_INT(Damage, 0);
|
||||
ACTION_PARAM_INT(Spawnofs_XY, 1);
|
||||
ACTION_PARAM_COLOR(Color1, 2);
|
||||
|
@ -1507,6 +1508,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
ACTION_PARAM_FLOAT(Sparsity, 12);
|
||||
ACTION_PARAM_FLOAT(DriftSpeed, 13);
|
||||
ACTION_PARAM_CLASS(SpawnClass, 14);
|
||||
ACTION_PARAM_FIXED(Spawnofs_Z, 15);
|
||||
|
||||
if(Range==0) Range=8192*FRACUNIT;
|
||||
if(Sparsity==0) Sparsity=1.0;
|
||||
|
@ -1590,7 +1592,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
|
|||
slopeoffset = pr_crailgun.Random2() * (Spread_Z / 255);
|
||||
}
|
||||
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Flags, PuffType, angleoffset, slopeoffset, Range, Duration, Sparsity, DriftSpeed, SpawnClass);
|
||||
P_RailAttack (self, Damage, Spawnofs_XY, Spawnofs_Z, Color1, Color2, MaxDiff, Flags, PuffType, angleoffset, slopeoffset, Range, Duration, Sparsity, DriftSpeed, SpawnClass);
|
||||
|
||||
self->x = saved_x;
|
||||
self->y = saved_y;
|
||||
|
|
|
@ -198,7 +198,7 @@ ACTOR Actor native //: Thinker
|
|||
action native A_Jump(int chance = 256, state label, ...);
|
||||
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");
|
||||
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_JumpIfCloser(float distance, state label);
|
||||
action native A_JumpIfTracerCloser(float distance, state label);
|
||||
|
|
|
@ -11,7 +11,7 @@ ACTOR Inventory native
|
|||
action native A_CustomPunch(int damage, bool norandom = false, int flags = CPF_USEAMMO, class<Actor> pufftype = "BulletPuff", float range = 0, float lifesteal = 0);
|
||||
action native A_FireBullets(float spread_xy, float spread_z, int numbullets, int damageperbullet, class<Actor> pufftype = "BulletPuff", int flags = 1, float range = 0);
|
||||
action native A_FireCustomMissile(class<Actor> missiletype, float angle = 0, bool useammo = true, int spawnofs_xy = 0, float spawnheight = 0, bool aimatangle = false, float pitch = 0);
|
||||
action native A_RailAttack(int damage, int spawnofs_xy = 0, int useammo = true, color color1 = "", color color2 = "", int flags = 0, 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");
|
||||
action native A_RailAttack(int damage, int spawnofs_xy = 0, int useammo = true, color color1 = "", color color2 = "", int flags = 0, 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_Light(int extralight);
|
||||
action native A_Light0();
|
||||
action native A_Light1();
|
||||
|
|
Loading…
Reference in a new issue