mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 20:53:45 +01:00
Better F6 profiler (#8750)
Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly)
This commit is contained in:
@@ -285,15 +285,14 @@ void ClientEnvironment::step(float dtime)
|
||||
/*
|
||||
Step and handle simple objects
|
||||
*/
|
||||
g_profiler->avg("CEnv: num of simple objects", m_simple_objects.size());
|
||||
g_profiler->avg("ClientEnv: CSO count [#]", m_simple_objects.size());
|
||||
for (auto i = m_simple_objects.begin(); i != m_simple_objects.end();) {
|
||||
auto cur = i;
|
||||
ClientSimpleObject *simple = *cur;
|
||||
ClientSimpleObject *simple = *i;
|
||||
|
||||
simple->step(dtime);
|
||||
if(simple->m_to_be_removed) {
|
||||
delete simple;
|
||||
i = m_simple_objects.erase(cur);
|
||||
i = m_simple_objects.erase(i);
|
||||
}
|
||||
else {
|
||||
++i;
|
||||
|
||||
Reference in New Issue
Block a user