From: sapier Date: Sat, 23 Aug 2014 23:56:27 +0000 (+0200) Subject: Fix retval of entity.get_staticdata beeing lost while profiling is enabled X-Git-Tag: 0.4.11~302 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3ce6888c1ccba6e54fef4c370d178824cf80e421;p=oweals%2Fminetest.git Fix retval of entity.get_staticdata beeing lost while profiling is enabled --- diff --git a/builtin/game/mod_profiling.lua b/builtin/game/mod_profiling.lua index 0fe99e725..df2d10221 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