This commit is contained in:
Rachael Alexanderson 2017-06-16 13:27:03 -04:00
commit c70dac2d7f
4 changed files with 18 additions and 40 deletions

View file

@ -456,7 +456,11 @@ void CheckCompatibility(MapData *map)
{
FMD5Holder md5;
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.
// I'm not sure if the IWAD maps actually need COMPATF_LIGHT but it certainly does not hurt.
@ -465,27 +469,6 @@ void CheckCompatibility(MapData *map)
{
ii_compatflags = COMPATF_SHORTTEX|COMPATF_LIGHT;
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"))
{
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"))
{
ii_compatflags = COMPATF_POLYOBJ;
ii_compatflags2 = 0;
ib_compatflags = 0;
ii_compatparams = -1;
}
else
{
onlyparams = false;
}
map->GetChecksum(md5.Bytes);
@ -512,24 +495,12 @@ void CheckCompatibility(MapData *map)
if (flags != NULL)
{
if (!onlyparams)
{
ii_compatflags = flags->CompatFlags[SLOT_COMPAT];
ii_compatflags2 = flags->CompatFlags[SLOT_COMPAT2];
ib_compatflags = flags->CompatFlags[SLOT_BCOMPAT];
}
ii_compatflags |= flags->CompatFlags[SLOT_COMPAT];
ii_compatflags2 |= flags->CompatFlags[SLOT_COMPAT2];
ib_compatflags |= flags->CompatFlags[SLOT_BCOMPAT];
ii_compatparams = flags->ExtCommandIndex;
}
else
{
if (!onlyparams)
{
ii_compatflags = 0;
ii_compatflags2 = 0;
ib_compatflags = 0;
}
ii_compatparams = -1;
}
// Reset i_compatflags
compatflags.Callback();
compatflags2.Callback();

View file

@ -2555,7 +2555,6 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
else
{
auto cnst = static_cast<FxConstant *>(x);
hasdefault = true;
switch (type->GetRegType())
{
case REGT_INT:
@ -2583,6 +2582,8 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
break;
}
}
hasdefault = true;
}
if (x != nullptr) delete x;
}

View file

@ -763,3 +763,9 @@ CA3773ED313E8899311F3DD0CA195A68 // e3m6
setsectorlight 138 192
setwalltexture 3431 back top BRKGRY01
}
3FFAF2F624C1B4BB6F581DCF7B99CBA7 // hexen.wad MAP36
7DC65D5029DD834481CD716B3D71388A // hexdd.wad MAP47
{
polyobj
}

View file

@ -266,7 +266,7 @@ class Inventory : Actor native
if (copy.bInitEffectFailed)
{
if (copy != self) copy.Destroy();
else bInitEffectFailed;
else bInitEffectFailed = false;
return false;
}
// Handle owner-changing powerups