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

master
sapier 2014-08-24 01:56:27 +02:00
parent e09293b483
commit 3ce6888c1c
1 changed files with 2 additions and 1 deletions

View File

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