mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +00:00
Added RGF_NORANDOMPUFFZ flag for A_CustomRailgun and A_RailAttack
This commit is contained in:
parent
fa22acca5d
commit
4d6532d303
3 changed files with 13 additions and 5 deletions
|
@ -372,6 +372,7 @@ enum // P_RailAttack / A_RailAttack / A_CustomRailgun / P_DrawRailTrail flags
|
|||
RAF_EXPLICITANGLE = 4,
|
||||
RAF_FULLBRIGHT = 8,
|
||||
RAF_CENTERZ = 16,
|
||||
RAF_NORANDOMPUFFZ = 32,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -4725,6 +4725,12 @@ void P_RailAttack(FRailParams *p)
|
|||
}
|
||||
}
|
||||
|
||||
int puffflags = 0;
|
||||
if (p->flags & RAF_NORANDOMPUFFZ)
|
||||
{
|
||||
puffflags |= PF_NORANDOMZ;
|
||||
}
|
||||
|
||||
DVector2 xy = source->Vec2Angle(p->offset_xy, angle - 90.);
|
||||
|
||||
RailData rail_data;
|
||||
|
@ -4777,7 +4783,7 @@ void P_RailAttack(FRailParams *p)
|
|||
bool spawnpuff;
|
||||
bool bleed = false;
|
||||
|
||||
int puffflags = PF_HITTHING;
|
||||
int actorpuffflags = puffflags | PF_HITTHING;
|
||||
AActor *hitactor = rail_data.RailHits[i].HitActor;
|
||||
DVector3 &hitpos = rail_data.RailHits[i].HitPos;
|
||||
DAngle hitangle = rail_data.RailHits[i].HitAngle;
|
||||
|
@ -4790,7 +4796,7 @@ void P_RailAttack(FRailParams *p)
|
|||
else
|
||||
{
|
||||
spawnpuff = (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF);
|
||||
puffflags |= PF_HITTHINGBLEED; // [XA] Allow for puffs to jump to XDeath state.
|
||||
actorpuffflags |= PF_HITTHINGBLEED; // [XA] Allow for puffs to jump to XDeath state.
|
||||
if (!(puffDefaults->flags3 & MF3_BLOODLESSIMPACT))
|
||||
{
|
||||
bleed = true;
|
||||
|
@ -4798,7 +4804,7 @@ void P_RailAttack(FRailParams *p)
|
|||
}
|
||||
if (spawnpuff)
|
||||
{
|
||||
P_SpawnPuff(source, puffclass, hitpos, hitangle, hitangle - 90, 1, puffflags, hitactor);
|
||||
P_SpawnPuff(source, puffclass, hitpos, hitangle, hitangle - 90, 1, actorpuffflags, hitactor);
|
||||
}
|
||||
|
||||
int dmgFlagPass = DMG_INFLICTOR_IS_PUFF;
|
||||
|
@ -4827,7 +4833,7 @@ void P_RailAttack(FRailParams *p)
|
|||
|
||||
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||
{
|
||||
puff = P_SpawnPuff(source, puffclass, trace.HitPos, trace.SrcAngleFromTarget, trace.SrcAngleFromTarget - 90, 1, 0);
|
||||
puff = P_SpawnPuff(source, puffclass, trace.HitPos, trace.SrcAngleFromTarget, trace.SrcAngleFromTarget - 90, 1, puffflags);
|
||||
if (puff && (trace.Line != NULL) && (trace.Line->special == Line_Horizon) && !(puff->flags3 & MF3_SKYEXPLODE))
|
||||
puff->Destroy();
|
||||
}
|
||||
|
@ -4842,7 +4848,7 @@ void P_RailAttack(FRailParams *p)
|
|||
AActor* puff = NULL;
|
||||
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
|
||||
{
|
||||
puff = P_SpawnPuff(source, puffclass, trace.HitPos, trace.SrcAngleFromTarget, trace.SrcAngleFromTarget - 90, 1, 0);
|
||||
puff = P_SpawnPuff(source, puffclass, trace.HitPos, trace.SrcAngleFromTarget, trace.SrcAngleFromTarget - 90, 1, puffflags);
|
||||
if (puff && !(puff->flags3 & MF3_SKYEXPLODE) &&
|
||||
(((trace.HitType == TRACE_HitFloor) && (puff->floorpic == skyflatnum)) ||
|
||||
((trace.HitType == TRACE_HitCeiling) && (puff->ceilingpic == skyflatnum))))
|
||||
|
|
|
@ -171,6 +171,7 @@ const int RGF_NOPIERCING = 2;
|
|||
const int RGF_EXPLICITANGLE = 4;
|
||||
const int RGF_FULLBRIGHT = 8;
|
||||
const int RGF_CENTERZ = 16;
|
||||
const int RGF_NORANDOMPUFFZ = 32;
|
||||
|
||||
// Flags for A_Mushroom
|
||||
const int MSF_Standard = 0;
|
||||
|
|
Loading…
Reference in a new issue