- 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
|
|
@ -751,14 +751,23 @@ IMPLEMENT_CLASS(ADecal, false, false)
|
|||
|
||||
void ADecal::BeginPlay ()
|
||||
{
|
||||
const FDecalTemplate *tpl;
|
||||
const FDecalTemplate *tpl = nullptr;
|
||||
|
||||
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 (decalid != 0 && (tpl = DecalLibrary.GetDecalByNum (decalid)) != 0)
|
||||
if (tpl != nullptr)
|
||||
{
|
||||
if (!tpl->PicNum.Exists())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue