1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-08-13 16:53:49 -04:00

Fix retval of entity.get_staticdata beeing lost while profiling is enabled

This commit is contained in:
sapier 2014-08-24 01:56:27 +02:00
parent e09293b483
commit 3ce6888c1c

View File

@ -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