From 0cc2705b99f641012d2622d7f8c36de2692ba390 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 3 Apr 2016 15:36:23 -0500 Subject: [PATCH] Added A_LogFloat --- src/thingdef/thingdef_codeptr.cpp | 16 ++++++++++++++++ wadsrc/static/actors/actor.txt | 1 + 2 files changed, 17 insertions(+) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 9fa547f46..c09615067 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2761,6 +2761,22 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LogInt) return 0; } +//========================================================================= +// +// A_LogFloat +// +//=========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LogFloat) +{ + PARAM_ACTION_PROLOGUE; + PARAM_FLOAT(num); + IGNORE_FORMAT_PRE + Printf("%H\n", num); + IGNORE_FORMAT_POST + return 0; +} + //=========================================================================== // // A_SetTranslucent diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 7548cd6c9..aa751e332 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -203,6 +203,7 @@ ACTOR Actor native //: Thinker action native A_PrintBold(string whattoprint, float time = 0, name fontname = ""); action native A_Log(string whattoprint); action native A_LogInt(int whattoprint); + action native A_LogFloat(float whattoprint); action native A_SetTranslucent(float alpha, int style = 0); action native A_FadeIn(float reduce = 0.1, int flags = 0); action native A_FadeOut(float reduce = 0.1, int flags = 1); //bool remove == true