mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 14:55:13 -05:00
Fix retval of entity.get_staticdata beeing lost while profiling is enabled
This commit is contained in:
parent
e09293b483
commit
3ce6888c1c
@ -309,9 +309,10 @@ local function initialize_profiling()
|
|||||||
mod_statistics.entity_callbacks[cbid] = prototype.get_staticdata
|
mod_statistics.entity_callbacks[cbid] = prototype.get_staticdata
|
||||||
new_get_staticdata = function(self)
|
new_get_staticdata = function(self)
|
||||||
local starttime = core.get_us_time()
|
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
|
local delta = core.get_us_time() -starttime
|
||||||
mod_statistics.log_time(cbid, modname, delta)
|
mod_statistics.log_time(cbid, modname, delta)
|
||||||
|
return retval
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user