- 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue