aboutsummaryrefslogtreecommitdiff
path: root/builtin/game
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-08-24 01:56:27 +0200
committersapier <Sapier at GMX dot net>2014-08-24 01:56:27 +0200
commit3ce6888c1ccba6e54fef4c370d178824cf80e421 (patch)
tree965571f64bf9b7bffa8dc3b8a3a28e14e6200fe0 /builtin/game
parente09293b483fcfb5a2095d4bfeccae57153df6250 (diff)
downloadminetest-3ce6888c1ccba6e54fef4c370d178824cf80e421.tar.gz
minetest-3ce6888c1ccba6e54fef4c370d178824cf80e421.tar.bz2
minetest-3ce6888c1ccba6e54fef4c370d178824cf80e421.zip
Fix retval of entity.get_staticdata beeing lost while profiling is enabled
Diffstat (limited to 'builtin/game')
-rw-r--r--builtin/game/mod_profiling.lua3
1 files changed, 2 insertions, 1 deletions
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