mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- restore old portal checks for Action Doom 2 (as a hidden compatibility option.)
SVN r3018 (trunk)
This commit is contained in:
parent
5bc4bc90bb
commit
74822572da
6 changed files with 33 additions and 14 deletions
|
@ -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);
|
||||||
|
|
|
@ -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(","));
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -582,20 +582,27 @@ 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 &&
|
||||||
check->alpha == alpha &&
|
(
|
||||||
(alpha == 0 || // if alpha is > 0 everything needs to be checked
|
// headache inducing logic... :(
|
||||||
(plane == check->height &&
|
(ib_compatflags & BCOMPATF_BADPORTALS) ||
|
||||||
picnum == check->picnum &&
|
(
|
||||||
lightlevel == check->lightlevel &&
|
check->alpha == alpha &&
|
||||||
xoffs == check->xoffs && // killough 2/28/98: Add offset checks
|
(alpha == 0 || // if alpha is > 0 everything needs to be checked
|
||||||
yoffs == check->yoffs &&
|
(plane == check->height &&
|
||||||
basecolormap == check->colormap && // [RH] Add more checks
|
picnum == check->picnum &&
|
||||||
xscale == check->xscale &&
|
lightlevel == check->lightlevel &&
|
||||||
yscale == check->yscale &&
|
xoffs == check->xoffs && // killough 2/28/98: Add offset checks
|
||||||
angle == check->angle
|
yoffs == check->yoffs &&
|
||||||
|
basecolormap == check->colormap && // [RH] Add more checks
|
||||||
|
xscale == check->xscale &&
|
||||||
|
yscale == check->yscale &&
|
||||||
|
angle == check->angle
|
||||||
|
)
|
||||||
|
) &&
|
||||||
|
check->viewangle == stacked_angle
|
||||||
)
|
)
|
||||||
) &&
|
)
|
||||||
check->viewangle == stacked_angle)
|
)
|
||||||
{
|
{
|
||||||
return check;
|
return check;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue