diff --git a/src/dobject.cpp b/src/dobject.cpp index 6b973de336..fd84f1574a 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -552,3 +552,9 @@ void DObject::CheckIfSerialized () const } } + +DEFINE_ACTION_FUNCTION(DObject, GetClassName) +{ + PARAM_SELF_PROLOGUE(DObject); + ACTION_RETURN_INT(self->GetClass()->TypeName); +} \ No newline at end of file diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 6db88ab0ad..658c4aa510 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -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(); }