Fix retval of entity.get_staticdata beeing lost while profiling is enabled
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