- restore old portal checks for Action Doom 2 (as a hidden compatibility option.)

SVN r3018 (trunk)
This commit is contained in:
Christoph Oelckers 2010-12-02 15:08:44 +00:00
parent 5bc4bc90bb
commit 74822572da
6 changed files with 33 additions and 14 deletions

View file

@ -90,6 +90,7 @@ static FCompatOption Options[] =
{ "resetplayerspeed", 0, BCOMPATF_RESETPLAYERSPEED }, { "resetplayerspeed", 0, BCOMPATF_RESETPLAYERSPEED },
{ "vileghosts", 0, BCOMPATF_VILEGHOSTS }, { "vileghosts", 0, BCOMPATF_VILEGHOSTS },
{ "ignoreteleporttags", 0, BCOMPATF_BADTELEPORTERS }, { "ignoreteleporttags", 0, BCOMPATF_BADTELEPORTERS },
{ "oldportals", 0, BCOMPATF_BADPORTALS },
// list copied from g_mapinfo.cpp // list copied from g_mapinfo.cpp
{ "shorttex", COMPATF_SHORTTEX, 0 }, { "shorttex", COMPATF_SHORTTEX, 0 },
@ -280,7 +281,12 @@ void CheckCompatibility(MapData *map)
ib_compatflags = 0; ib_compatflags = 0;
ii_compatparams = -1; ii_compatparams = -1;
} }
else if (Wads.GetLumpFile(map->lumpnum) == 1 && (gameinfo.flags & GI_COMPATPORTAL))
{
ii_compatflags = 0;
ib_compatflags = BCOMPATF_BADPORTALS;
ii_compatparams = -1;
}
else else
{ {
map->GetChecksum(md5.Bytes); map->GetChecksum(md5.Bytes);

View file

@ -174,6 +174,7 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize)
else if(sc.Compare("Extended")) iwad->flags |= GI_MENUHACK_EXTENDED; else if(sc.Compare("Extended")) iwad->flags |= GI_MENUHACK_EXTENDED;
else if(sc.Compare("Shorttex")) iwad->flags |= GI_COMPATSHORTTEX; else if(sc.Compare("Shorttex")) iwad->flags |= GI_COMPATSHORTTEX;
else if(sc.Compare("Stairs")) iwad->flags |= GI_COMPATSTAIRS; else if(sc.Compare("Stairs")) iwad->flags |= GI_COMPATSTAIRS;
else if(sc.Compare("Portals")) iwad->flags |= GI_BADPORTALS;
else sc.ScriptError(NULL); else sc.ScriptError(NULL);
} }
while (sc.CheckString(",")); while (sc.CheckString(","));

View file

@ -342,6 +342,7 @@ enum
BCOMPATF_RESETPLAYERSPEED = 1 << 1, // Set player speed to 1.0 when changing maps BCOMPATF_RESETPLAYERSPEED = 1 << 1, // Set player speed to 1.0 when changing maps
BCOMPATF_VILEGHOSTS = 1 << 2, // Monsters' radius and height aren't restored properly when resurrected. BCOMPATF_VILEGHOSTS = 1 << 2, // Monsters' radius and height aren't restored properly when resurrected.
BCOMPATF_BADTELEPORTERS = 1 << 3, // Ignore tags on Teleport specials BCOMPATF_BADTELEPORTERS = 1 << 3, // Ignore tags on Teleport specials
BCOMPATF_BADPORTALS = 1 << 4, // Restores the old unstable portal behavior
}; };
// phares 3/20/98: // phares 3/20/98:

View file

@ -975,6 +975,9 @@ void P_SetupPortals()
points.Push(pt); points.Push(pt);
} }
// Maps using undefined portal hacks may not benefit from portal optimizations.
if (ib_compatflags & BCOMPATF_BADPORTALS) return;
for(unsigned i=0;i<points.Size(); i++) for(unsigned i=0;i<points.Size(); i++)
{ {
if (points[i]->special1 == 0 && points[i]->Mate != NULL) if (points[i]->special1 == 0 && points[i]->Mate != NULL)

View file

@ -582,6 +582,10 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
check->viewx == stacked_viewx && check->viewx == stacked_viewx &&
check->viewy == stacked_viewy && check->viewy == stacked_viewy &&
check->viewz == stacked_viewz && check->viewz == stacked_viewz &&
(
// headache inducing logic... :(
(ib_compatflags & BCOMPATF_BADPORTALS) ||
(
check->alpha == alpha && check->alpha == alpha &&
(alpha == 0 || // if alpha is > 0 everything needs to be checked (alpha == 0 || // if alpha is > 0 everything needs to be checked
(plane == check->height && (plane == check->height &&
@ -595,7 +599,10 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
angle == check->angle angle == check->angle
) )
) && ) &&
check->viewangle == stacked_angle) check->viewangle == stacked_angle
)
)
)
{ {
return check; return check;
} }

View file

@ -26,6 +26,7 @@ IWad
Game = "Doom" Game = "Doom"
Config = "UrbanBrawl" Config = "UrbanBrawl"
Mapinfo = "mapinfo/urbanbrawl.txt" Mapinfo = "mapinfo/urbanbrawl.txt"
Compatibility = "Portals"
MustContain = "MAP01", "AD2LIB" MustContain = "MAP01", "AD2LIB"
BannerColors = "a8 a8 00", "a8 00 00" BannerColors = "a8 a8 00", "a8 00 00"
} }