- added GetClassName script function.

This commit is contained in:
Christoph Oelckers 2016-12-27 19:25:55 +01:00
parent 2478cd0467
commit 8708c69f83
2 changed files with 8 additions and 0 deletions

View file

@ -552,3 +552,9 @@ void DObject::CheckIfSerialized () const
}
}
DEFINE_ACTION_FUNCTION(DObject, GetClassName)
{
PARAM_SELF_PROLOGUE(DObject);
ACTION_RETURN_INT(self->GetClass()->TypeName);
}

View file

@ -13,6 +13,8 @@ class Object native
native static void C_MidPrint(string fontname, string textlabel, bool bold = false); // always uses the stringtable.
native static uint BAM(double angle);
native Name GetClassName();
/*virtual*/ native void Destroy();
}