mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 06:41:41 +00:00
- allow specifying specials in ZSDF by name.
- allow specifying a decal ID by name in UDMF.
This commit is contained in:
parent
ee6e427e78
commit
f31ddbc57c
4 changed files with 20 additions and 3 deletions
|
@ -92,6 +92,8 @@ conversation // Starts a dialog.
|
||||||
|
|
||||||
choice
|
choice
|
||||||
{
|
{
|
||||||
|
specialname = <string>; // Allows specifying a special by name.
|
||||||
|
|
||||||
// The amount of an item needed for this option to become available.
|
// The amount of an item needed for this option to become available.
|
||||||
// You can have as many as needed. All require blocks must be satisfied
|
// You can have as many as needed. All require blocks must be satisfied
|
||||||
// to show this option.
|
// to show this option.
|
||||||
|
|
|
@ -751,14 +751,23 @@ IMPLEMENT_CLASS(ADecal, false, false)
|
||||||
|
|
||||||
void ADecal::BeginPlay ()
|
void ADecal::BeginPlay ()
|
||||||
{
|
{
|
||||||
const FDecalTemplate *tpl;
|
const FDecalTemplate *tpl = nullptr;
|
||||||
|
|
||||||
Super::BeginPlay ();
|
Super::BeginPlay ();
|
||||||
|
|
||||||
int decalid = args[0] + (args[1] << 8); // [KS] High byte for decals.
|
if (args[0] < 0)
|
||||||
|
{
|
||||||
|
FName name = ENamedName(-args[0]);
|
||||||
|
tpl = DecalLibrary.GetDecalByName(name.GetChars());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int decalid = args[0] + (args[1] << 8); // [KS] High byte for decals.
|
||||||
|
tpl = DecalLibrary.GetDecalByNum(decalid);
|
||||||
|
}
|
||||||
|
|
||||||
// If no decal is specified, don't try to create one.
|
// If no decal is specified, don't try to create one.
|
||||||
if (decalid != 0 && (tpl = DecalLibrary.GetDecalByNum (decalid)) != 0)
|
if (tpl != nullptr)
|
||||||
{
|
{
|
||||||
if (!tpl->PicNum.Exists())
|
if (!tpl->PicNum.Exists())
|
||||||
{
|
{
|
||||||
|
|
|
@ -360,6 +360,7 @@ xx(CeilingZ)
|
||||||
xx(FloorZ)
|
xx(FloorZ)
|
||||||
xx(Health)
|
xx(Health)
|
||||||
xx(Pitch)
|
xx(Pitch)
|
||||||
|
xx(SpecialName)
|
||||||
xx(Special)
|
xx(Special)
|
||||||
xx(TID)
|
xx(TID)
|
||||||
xx(TIDtoHate)
|
xx(TIDtoHate)
|
||||||
|
|
|
@ -196,6 +196,11 @@ class USDFParser : public UDMFParserBase
|
||||||
reply->ActionSpecial = 0;
|
reply->ActionSpecial = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NAME_SpecialName:
|
||||||
|
if (namespace_bits == Zd)
|
||||||
|
reply->ActionSpecial = P_FindLineSpecial(CheckString(key));
|
||||||
|
break;
|
||||||
|
|
||||||
case NAME_Arg0:
|
case NAME_Arg0:
|
||||||
case NAME_Arg1:
|
case NAME_Arg1:
|
||||||
case NAME_Arg2:
|
case NAME_Arg2:
|
||||||
|
|
Loading…
Reference in a new issue