mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 12:32:34 +00:00
All compatibility options are now applied for IWAD maps
https://forum.zdoom.org/viewtopic.php?t=56867
This commit is contained in:
parent
29ca258cb9
commit
5874d01a73
1 changed files with 9 additions and 30 deletions
|
@ -456,7 +456,11 @@ void CheckCompatibility(MapData *map)
|
||||||
{
|
{
|
||||||
FMD5Holder md5;
|
FMD5Holder md5;
|
||||||
FCompatValues *flags;
|
FCompatValues *flags;
|
||||||
bool onlyparams = true;
|
|
||||||
|
ii_compatflags = 0;
|
||||||
|
ii_compatflags2 = 0;
|
||||||
|
ib_compatflags = 0;
|
||||||
|
ii_compatparams = -1;
|
||||||
|
|
||||||
// When playing Doom IWAD levels force COMPAT_SHORTTEX and COMPATF_LIGHT.
|
// When playing Doom IWAD levels force COMPAT_SHORTTEX and COMPATF_LIGHT.
|
||||||
// I'm not sure if the IWAD maps actually need COMPATF_LIGHT but it certainly does not hurt.
|
// I'm not sure if the IWAD maps actually need COMPATF_LIGHT but it certainly does not hurt.
|
||||||
|
@ -465,27 +469,14 @@ void CheckCompatibility(MapData *map)
|
||||||
{
|
{
|
||||||
ii_compatflags = COMPATF_SHORTTEX|COMPATF_LIGHT;
|
ii_compatflags = COMPATF_SHORTTEX|COMPATF_LIGHT;
|
||||||
if (gameinfo.flags & GI_COMPATSTAIRS) ii_compatflags |= COMPATF_STAIRINDEX;
|
if (gameinfo.flags & GI_COMPATSTAIRS) ii_compatflags |= COMPATF_STAIRINDEX;
|
||||||
ii_compatflags2 = 0;
|
|
||||||
ib_compatflags = 0;
|
|
||||||
ii_compatparams = -1;
|
|
||||||
}
|
}
|
||||||
else if (Wads.GetLumpFile(map->lumpnum) == 1 && (gameinfo.flags & GI_COMPATPOLY1) && Wads.CheckLumpName(map->lumpnum, "MAP36"))
|
else if (Wads.GetLumpFile(map->lumpnum) == 1 && (gameinfo.flags & GI_COMPATPOLY1) && Wads.CheckLumpName(map->lumpnum, "MAP36"))
|
||||||
{
|
{
|
||||||
ii_compatflags = COMPATF_POLYOBJ;
|
ii_compatflags = COMPATF_POLYOBJ;
|
||||||
ii_compatflags2 = 0;
|
|
||||||
ib_compatflags = 0;
|
|
||||||
ii_compatparams = -1;
|
|
||||||
}
|
}
|
||||||
else if (Wads.GetLumpFile(map->lumpnum) == 2 && (gameinfo.flags & GI_COMPATPOLY2) && Wads.CheckLumpName(map->lumpnum, "MAP47"))
|
else if (Wads.GetLumpFile(map->lumpnum) == 2 && (gameinfo.flags & GI_COMPATPOLY2) && Wads.CheckLumpName(map->lumpnum, "MAP47"))
|
||||||
{
|
{
|
||||||
ii_compatflags = COMPATF_POLYOBJ;
|
ii_compatflags = COMPATF_POLYOBJ;
|
||||||
ii_compatflags2 = 0;
|
|
||||||
ib_compatflags = 0;
|
|
||||||
ii_compatparams = -1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
onlyparams = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
map->GetChecksum(md5.Bytes);
|
map->GetChecksum(md5.Bytes);
|
||||||
|
@ -512,24 +503,12 @@ void CheckCompatibility(MapData *map)
|
||||||
|
|
||||||
if (flags != NULL)
|
if (flags != NULL)
|
||||||
{
|
{
|
||||||
if (!onlyparams)
|
ii_compatflags |= flags->CompatFlags[SLOT_COMPAT];
|
||||||
{
|
ii_compatflags2 |= flags->CompatFlags[SLOT_COMPAT2];
|
||||||
ii_compatflags = flags->CompatFlags[SLOT_COMPAT];
|
ib_compatflags |= flags->CompatFlags[SLOT_BCOMPAT];
|
||||||
ii_compatflags2 = flags->CompatFlags[SLOT_COMPAT2];
|
|
||||||
ib_compatflags = flags->CompatFlags[SLOT_BCOMPAT];
|
|
||||||
}
|
|
||||||
ii_compatparams = flags->ExtCommandIndex;
|
ii_compatparams = flags->ExtCommandIndex;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!onlyparams)
|
|
||||||
{
|
|
||||||
ii_compatflags = 0;
|
|
||||||
ii_compatflags2 = 0;
|
|
||||||
ib_compatflags = 0;
|
|
||||||
}
|
|
||||||
ii_compatparams = -1;
|
|
||||||
}
|
|
||||||
// Reset i_compatflags
|
// Reset i_compatflags
|
||||||
compatflags.Callback();
|
compatflags.Callback();
|
||||||
compatflags2.Callback();
|
compatflags2.Callback();
|
||||||
|
|
Loading…
Reference in a new issue