- Fixed: The health bonuses atop the pillars in the starting room of Void could not be picked

up because they no longer physically clip through the floor.

SVN r4038 (trunk)
This commit is contained in:
Randy Heit 2013-01-23 04:48:33 +00:00
commit 9b5232a410
2 changed files with 88 additions and 1 deletions

View file

@ -77,7 +77,9 @@ enum
CP_SETFLAGS,
CP_SETSPECIAL,
CP_CLEARSPECIAL,
CP_SETACTIVATION
CP_SETACTIVATION,
CP_SECTORFLOOROFFSET,
CP_SETWALLYSCALE,
};
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
@ -137,6 +139,16 @@ static FCompatOption Options[] =
{ NULL, 0, 0 }
};
static const char *const LineSides[] =
{
"Front", "Back", NULL
};
static const char *const WallTiers[] =
{
"Top", "Mid", "Bot", NULL
};
static TArray<int> CompatParams;
static int ii_compatparams;
@ -259,6 +271,28 @@ void ParseCompatibility()
sc.MustGetNumber();
CompatParams.Push(sc.Number);
}
else if (sc.Compare("sectorflooroffset"))
{
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SECTORFLOOROFFSET);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
sc.MustGetFloat();
CompatParams.Push(FLOAT2FIXED(sc.Float));
}
else if (sc.Compare("setwallyscale"))
{
if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETWALLYSCALE);
sc.MustGetNumber();
CompatParams.Push(sc.Number);
sc.MustGetString();
CompatParams.Push(sc.MustMatchString(LineSides));
sc.MustGetString();
CompatParams.Push(sc.MustMatchString(WallTiers));
sc.MustGetFloat();
CompatParams.Push(FLOAT2FIXED(sc.Float));
}
else
{
sc.UnGet();
@ -438,6 +472,30 @@ void SetCompatibilityParams()
i += 3;
break;
}
case CP_SECTORFLOOROFFSET:
{
if (CompatParams[i+1] < numsectors)
{
sector_t *sec = &sectors[CompatParams[i+1]];
sec->floorplane.ChangeHeight(CompatParams[i+2]);
sec->ChangePlaneTexZ(sector_t::floor, CompatParams[i+2]);
}
i += 3;
break;
}
case CP_SETWALLYSCALE:
{
if (CompatParams[i+1] < numlines)
{
side_t *side = lines[CompatParams[i+1]].sidedef[CompatParams[i+2]];
if (side != NULL)
{
side->SetTextureYScale(CompatParams[i+3], CompatParams[i+4]);
}
}
i += 5;
break;
}
}
}
}