mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
Added GetDecalName()
This commit is contained in:
parent
3524d06813
commit
8c10ac6f38
4 changed files with 24 additions and 0 deletions
|
@ -205,6 +205,11 @@ const FDecalTemplate *FDecalBase::GetDecal () const
|
|||
return NULL;
|
||||
}
|
||||
|
||||
FName FDecalBase::GetDecalName() const
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
|
||||
void FDecalTemplate::ReplaceDecalRef(FDecalBase *from, FDecalBase *to)
|
||||
{
|
||||
if (LowerDecal == from)
|
||||
|
|
|
@ -53,6 +53,7 @@ class FDecalBase
|
|||
public:
|
||||
virtual const FDecalTemplate *GetDecal () const;
|
||||
virtual void ReplaceDecalRef (FDecalBase *from, FDecalBase *to) = 0;
|
||||
FName GetDecalName() const;
|
||||
|
||||
protected:
|
||||
FDecalBase ();
|
||||
|
|
|
@ -934,3 +934,20 @@ DEFINE_ACTION_FUNCTION_NATIVE(ADecal, SpawnDecal, SpawnDecal)
|
|||
SpawnDecal(self);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
static int GetDecalName(AActor* self)
|
||||
{
|
||||
return self->DecalGenerator != nullptr ? self->DecalGenerator->GetDecalName().GetIndex() : NAME_None;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(AActor, GetDecalName, GetDecalName)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
ACTION_RETURN_INT(GetDecalName(self));
|
||||
}
|
||||
|
|
|
@ -715,6 +715,7 @@ class Actor : Thinker native
|
|||
native void ClearFOVInterpolation();
|
||||
native clearscope Vector3 PosRelative(sector sec) const;
|
||||
native void RailAttack(FRailParams p);
|
||||
native clearscope Name GetDecalName() const;
|
||||
|
||||
native void HandleSpawnFlags();
|
||||
native void ExplodeMissile(line lin = null, Actor target = null, bool onsky = false);
|
||||
|
|
Loading…
Reference in a new issue