This commit is contained in:
Christoph Oelckers 2016-07-23 10:56:12 +02:00
commit 2cdc77de34
4 changed files with 15 additions and 7 deletions

View File

@ -2507,7 +2507,7 @@ static bool DoDehPatch()
cont = 0;
if (0 == strncmp (PatchFile, "Patch File for DeHackEd v", 25))
{
if (PatchFile[25] < '3')
if (PatchFile[25] < '3' && PatchFile[25] != '2' && PatchFile[27] != '3')
{
Printf (PRINT_BOLD, "\"%s\" is an old and unsupported DeHackEd patch\n", PatchName);
delete[] PatchName;
@ -2544,7 +2544,7 @@ static bool DoDehPatch()
{}
}
if (pversion != 6)
if (pversion != 5 && pversion != 6)
{
Printf ("DeHackEd patch version is %d.\nUnexpected results may occur.\n", pversion);
}

View File

@ -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,
};

View File

@ -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))))

View File

@ -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;