diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 18:31:12 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 18:31:12 +1000 |
commit | deb96742e020be5e83314a5a28ddba3c96df6f6e (patch) | |
tree | 84a3e2fe6b0fd852c14a50a82a21c2b352291801 /source/game/StarWorldClient.cpp | |
parent | 1dacc0f41ad04a75e9fa3ca2bb6289aac57b68a7 (diff) |
Prevent particle copy, tweak debugging some more
probably not too time-saving
Diffstat (limited to 'source/game/StarWorldClient.cpp')
-rw-r--r-- | source/game/StarWorldClient.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp index accf025..552b6e2 100644 --- a/source/game/StarWorldClient.cpp +++ b/source/game/StarWorldClient.cpp @@ -535,8 +535,8 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) { } } - renderData.particles = m_particles->particles(); - LogMap::set("active_particles", renderData.particles.size()); + renderData.particles = &m_particles->particles(); + LogMap::set("client_render_particle_count", renderData.particles->size()); renderData.skyRenderData = m_sky->renderData(); @@ -569,9 +569,10 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) { } } + auto functionDatabase = Root::singleton().functionDatabase(); for (auto& layer : renderData.parallaxLayers) { if (!layer.timeOfDayCorrelation.empty()) - layer.alpha *= clamp((float)Root::singleton().functionDatabase()->function(layer.timeOfDayCorrelation)->evaluate(m_sky->timeOfDay() / m_sky->dayLength()), 0.0f, 1.0f); + layer.alpha *= clamp((float)functionDatabase->function(layer.timeOfDayCorrelation)->evaluate(m_sky->timeOfDay() / m_sky->dayLength()), 0.0f, 1.0f); } stableSort(renderData.parallaxLayers, [](ParallaxLayer const& a, ParallaxLayer const& b) { @@ -1458,7 +1459,7 @@ void WorldClient::lightingMain() { m_lightingCalculator.calculate(m_renderData->lightMap); m_renderData = nullptr; - LogMap::set("render_world_async_lighting_calc_time", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); + LogMap::set("client_render_world_async_light_calc", strf(u8"{:05d}\u00b5s", Time::monotonicMicroseconds() - start)); } m_lightingCond.wait(m_lightingMutex); |