From 3ce6888c1ccba6e54fef4c370d178824cf80e421 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 24 Aug 2014 01:56:27 +0200 Subject: [PATCH] Fix retval of entity.get_staticdata beeing lost while profiling is enabled --- builtin/game/mod_profiling.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/builtin/game/mod_profiling.lua b/builtin/game/mod_profiling.lua index 0fe99e72..df2d1022 100644 --- a/builtin/game/mod_profiling.lua +++ b/builtin/game/mod_profiling.lua @@ -309,9 +309,10 @@ local function initialize_profiling() mod_statistics.entity_callbacks[cbid] = prototype.get_staticdata new_get_staticdata = function(self) local starttime = core.get_us_time() - mod_statistics.entity_callbacks[cbid](self) + local retval = mod_statistics.entity_callbacks[cbid](self) local delta = core.get_us_time() -starttime mod_statistics.log_time(cbid, modname, delta) + return retval end end