- addressed the problem that prompted setting NOGRAVITY for all floatbobbing items for real:

Hexen uses the spawn height value from the mapthing_t structure to offset the item when floatbobbing. With proper gravity handling enabled this method doesn't really work so as a workaround ZDoom will now enable a hidden compatibility option when playing any map with a Hexen format MAPINFO so that any positive value in this field will make P_ZMovement revert to the original method of setting the items height (excluding the floatbob offset, of course.)

This also removes some code from P_NightmareRespawn that originate from the original Hexen method for floatbobbing which aren't needed anymore
This commit is contained in:
Christoph Oelckers 2015-02-12 18:57:06 +01:00
commit 93c12cf259
3 changed files with 28 additions and 3 deletions

View file

@ -109,6 +109,7 @@ static FCompatOption Options[] =
{ "rebuildnodes", BCOMPATF_REBUILDNODES, SLOT_BCOMPAT },
{ "linkfrozenprops", BCOMPATF_LINKFROZENPROPS, SLOT_BCOMPAT },
{ "disablepushwindowcheck", BCOMPATF_NOWINDOWCHECK, SLOT_BCOMPAT },
{ "floatbob", BCOMPATF_FLOATBOB, SLOT_BCOMPAT },
// list copied from g_mapinfo.cpp
{ "shorttex", COMPATF_SHORTTEX, SLOT_COMPAT },
@ -434,6 +435,11 @@ void CheckCompatibility(MapData *map)
// Reset i_compatflags
compatflags.Callback();
compatflags2.Callback();
// Set floatbob compatibility for all maps with an original Hexen MAPINFO.
if (level.flags2 & LEVEL2_HEXENHACK)
{
ib_compatflags |= BCOMPATF_FLOATBOB;
}
}
//==========================================================================