mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix retval of entity.get_staticdata beeing lost while profiling is enabled
This commit is contained in:
parent
e09293b483
commit
3ce6888c1c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue