mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 17:11:24 +00:00
- added A_Explode compatibility options.
There are two options here - one only disables the vertical thrust and the other goes back fully to the original non-z-aware code. Both options are settable through MAPINFO. For the compatibility presets, the normal ones only disable the vertical thrust, the strict ones force use of the old code entirely. # Conflicts: # wadsrc/static/language.csv
This commit is contained in:
parent
18a17c4e1f
commit
a488791add
8 changed files with 37 additions and 16 deletions
|
@ -163,6 +163,8 @@ static FCompatOption Options[] =
|
|||
{ "teleport", COMPATF2_TELEPORT, SLOT_COMPAT2 },
|
||||
{ "disablepushwindowcheck", COMPATF2_PUSHWINDOW, SLOT_COMPAT2 },
|
||||
{ "checkswitchrange", COMPATF2_CHECKSWITCHRANGE, SLOT_COMPAT2 },
|
||||
{ "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 },
|
||||
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -580,22 +580,23 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
break;
|
||||
|
||||
case 1: // Doom2.exe compatible with a few relaxed settings
|
||||
v = COMPATF_SHORTTEX|COMPATF_STAIRINDEX|COMPATF_USEBLOCKING|COMPATF_NODOORLIGHT|COMPATF_SPRITESORT|
|
||||
COMPATF_TRACE|COMPATF_MISSILECLIP|COMPATF_SOUNDTARGET|COMPATF_DEHHEALTH|COMPATF_CROSSDROPOFF|
|
||||
COMPATF_LIGHT|COMPATF_MASKEDMIDTEX;
|
||||
w= COMPATF2_FLOORMOVE;
|
||||
v = COMPATF_SHORTTEX | COMPATF_STAIRINDEX | COMPATF_USEBLOCKING | COMPATF_NODOORLIGHT | COMPATF_SPRITESORT |
|
||||
COMPATF_TRACE | COMPATF_MISSILECLIP | COMPATF_SOUNDTARGET | COMPATF_DEHHEALTH | COMPATF_CROSSDROPOFF |
|
||||
COMPATF_LIGHT | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_FLOORMOVE | COMPATF2_EXPLODE1;
|
||||
break;
|
||||
|
||||
case 2: // same as 1 but stricter (NO_PASSMOBJ and INVISIBILITY are also set)
|
||||
v = COMPATF_SHORTTEX|COMPATF_STAIRINDEX|COMPATF_USEBLOCKING|COMPATF_NODOORLIGHT|COMPATF_SPRITESORT|
|
||||
COMPATF_TRACE|COMPATF_MISSILECLIP|COMPATF_SOUNDTARGET|COMPATF_NO_PASSMOBJ|COMPATF_LIMITPAIN|
|
||||
COMPATF_DEHHEALTH|COMPATF_INVISIBILITY|COMPATF_CROSSDROPOFF|COMPATF_CORPSEGIBS|COMPATF_HITSCAN|
|
||||
COMPATF_WALLRUN|COMPATF_NOTOSSDROPS|COMPATF_LIGHT|COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_BADANGLES|COMPATF2_FLOORMOVE|COMPATF2_POINTONLINE;
|
||||
v = COMPATF_SHORTTEX | COMPATF_STAIRINDEX | COMPATF_USEBLOCKING | COMPATF_NODOORLIGHT | COMPATF_SPRITESORT |
|
||||
COMPATF_TRACE | COMPATF_MISSILECLIP | COMPATF_SOUNDTARGET | COMPATF_NO_PASSMOBJ | COMPATF_LIMITPAIN |
|
||||
COMPATF_DEHHEALTH | COMPATF_INVISIBILITY | COMPATF_CROSSDROPOFF | COMPATF_CORPSEGIBS | COMPATF_HITSCAN |
|
||||
COMPATF_WALLRUN | COMPATF_NOTOSSDROPS | COMPATF_LIGHT | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_BADANGLES | COMPATF2_FLOORMOVE | COMPATF2_POINTONLINE | COMPATF2_EXPLODE2;
|
||||
break;
|
||||
|
||||
case 3: // Boom compat mode
|
||||
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_EXPLODE1;
|
||||
break;
|
||||
|
||||
case 4: // Old ZDoom compat mode
|
||||
|
@ -604,14 +605,15 @@ CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
break;
|
||||
|
||||
case 5: // MBF compat mode
|
||||
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_MUSHROOM|
|
||||
COMPATF_MBFMONSTERMOVE|COMPATF_NOBLOCKFRIENDS|COMPATF_MASKEDMIDTEX;
|
||||
v = COMPATF_TRACE | COMPATF_SOUNDTARGET | COMPATF_BOOMSCROLL | COMPATF_MISSILECLIP | COMPATF_MUSHROOM |
|
||||
COMPATF_MBFMONSTERMOVE | COMPATF_NOBLOCKFRIENDS | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_EXPLODE1;
|
||||
break;
|
||||
|
||||
case 6: // Boom with some added settings to reenable some 'broken' behavior
|
||||
v = COMPATF_TRACE|COMPATF_SOUNDTARGET|COMPATF_BOOMSCROLL|COMPATF_MISSILECLIP|COMPATF_NO_PASSMOBJ|
|
||||
COMPATF_INVISIBILITY|COMPATF_CORPSEGIBS|COMPATF_HITSCAN|COMPATF_WALLRUN|COMPATF_NOTOSSDROPS|COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_POINTONLINE;
|
||||
v = COMPATF_TRACE | COMPATF_SOUNDTARGET | COMPATF_BOOMSCROLL | COMPATF_MISSILECLIP | COMPATF_NO_PASSMOBJ |
|
||||
COMPATF_INVISIBILITY | COMPATF_CORPSEGIBS | COMPATF_HITSCAN | COMPATF_WALLRUN | COMPATF_NOTOSSDROPS | COMPATF_MASKEDMIDTEX;
|
||||
w = COMPATF2_POINTONLINE | COMPATF2_EXPLODE2;
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -659,6 +661,8 @@ CVAR (Flag, compat_multiexit, compatflags2, COMPATF2_MULTIEXIT);
|
|||
CVAR (Flag, compat_teleport, compatflags2, COMPATF2_TELEPORT);
|
||||
CVAR (Flag, compat_pushwindow, compatflags2, COMPATF2_PUSHWINDOW);
|
||||
CVAR (Flag, compat_checkswitchrange, compatflags2, COMPATF2_CHECKSWITCHRANGE);
|
||||
CVAR (Flag, compat_explode1, compatflags2, COMPATF2_EXPLODE1);
|
||||
CVAR (Flag, compat_explode2, compatflags2, COMPATF2_EXPLODE2);
|
||||
|
||||
CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
|
|
|
@ -356,6 +356,8 @@ enum : unsigned int
|
|||
COMPATF2_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions
|
||||
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
|
||||
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
|
||||
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
|
||||
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
|
||||
};
|
||||
|
||||
// Emulate old bugs for select maps. These are not exposed by a cvar
|
||||
|
|
|
@ -1532,6 +1532,8 @@ MapFlagHandlers[] =
|
|||
{ "compat_teleport", MITYPE_COMPATFLAG, 0, COMPATF2_TELEPORT },
|
||||
{ "compat_pushwindow", MITYPE_COMPATFLAG, 0, COMPATF2_PUSHWINDOW },
|
||||
{ "compat_checkswitchrange", MITYPE_COMPATFLAG, 0, COMPATF2_CHECKSWITCHRANGE },
|
||||
{ "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 },
|
||||
{ "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 },
|
||||
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
|
||||
|
|
|
@ -5900,7 +5900,8 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
|
|||
// them far too "active." BossBrains also use the old code
|
||||
// because some user levels require they have a height of 16,
|
||||
// which can make them near impossible to hit with the new code.
|
||||
if (((flags & RADF_NODAMAGE) || !((bombspot->flags5 | thing->flags5) & MF5_OLDRADIUSDMG)) && !(flags & RADF_OLDRADIUSDAMAGE))
|
||||
if ((flags & RADF_NODAMAGE) || (!((bombspot->flags5 | thing->flags5) & MF5_OLDRADIUSDMG) &&
|
||||
!(flags & RADF_OLDRADIUSDAMAGE) && !(i_compatflags2 & COMPATF2_EXPLODE2)))
|
||||
{
|
||||
double points = GetRadiusDamage(false, bombspot, thing, bombdamage, bombdistance, fulldamagedistance, bombsource == thing);
|
||||
double check = int(points) * bombdamage;
|
||||
|
@ -5950,7 +5951,10 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
|
|||
}
|
||||
thing->Thrust(bombspot->AngleTo(thing), thrust);
|
||||
if (!(flags & RADF_NODAMAGE) || (flags & RADF_THRUSTZ))
|
||||
thing->Vel.Z += vz; // this really doesn't work well
|
||||
{
|
||||
if (!(i_compatflags2 & COMPATF2_EXPLODE1) || (flags & RADF_THRUSTZ))
|
||||
thing->Vel.Z += vz; // this really doesn't work well
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1606,6 +1606,8 @@ OptionMenu "CompatPhysicsMenu" protected
|
|||
Option "$CMPTMNU_TRACE", "compat_TRACE", "YesNo"
|
||||
Option "$CMPTMNU_HITSCAN", "compat_HITSCAN", "YesNo"
|
||||
Option "$CMPTMNU_MISSILECLIP", "compat_MISSILECLIP", "YesNo"
|
||||
Option "$CMPTMNU_EXPLODE1", "compat_explode1", "YesNo"
|
||||
Option "$CMPTMNU_EXPLODE2", "compat_explode2", "YesNo"
|
||||
Class "CompatibilityMenu"
|
||||
}
|
||||
|
||||
|
|
|
@ -596,6 +596,7 @@ extend class Actor
|
|||
int pflags = 0;
|
||||
if (flags & XF_HURTSOURCE) pflags |= RADF_HURTSOURCE;
|
||||
if (flags & XF_NOTMISSILE) pflags |= RADF_SOURCEISSPOT;
|
||||
if (flags & XF_THRUSTZ) pflags |= RADF_THRUSTZ;
|
||||
|
||||
int count = RadiusAttack (target, damage, distance, damagetype, pflags, fulldamagedistance);
|
||||
if (!(flags & XF_NOSPLASH)) CheckSplash(distance);
|
||||
|
|
|
@ -259,6 +259,8 @@ enum EExplodeFlags
|
|||
XF_NOTMISSILE = 4,
|
||||
XF_EXPLICITDAMAGETYPE = 8,
|
||||
XF_NOSPLASH = 16,
|
||||
XF_THRUSTZ = 32,
|
||||
|
||||
};
|
||||
|
||||
// Flags for A_RadiusThrust
|
||||
|
@ -1339,4 +1341,6 @@ enum ECompatFlags
|
|||
COMPATF2_TELEPORT = 1 << 5, // Don't let indirect teleports trigger sector actions
|
||||
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
|
||||
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
|
||||
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
|
||||
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue