Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarPlayerDeployment.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 10:11:19 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-29 10:11:19 +1000
commit624c7aaaf192f2e87081a241123a8507a4718ba3 (patch)
treea54b09902da8d724f3ba740a215fd53d8a861fd9 /source/game/StarPlayerDeployment.cpp
parent9d67cda97fc327ca3c53e044a897fbfb196104c4 (diff)
Move lighting calculation to separate thread
Diffstat (limited to 'source/game/StarPlayerDeployment.cpp')
-rw-r--r--source/game/StarPlayerDeployment.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/game/StarPlayerDeployment.cpp b/source/game/StarPlayerDeployment.cpp
index b84e177..4565074 100644
--- a/source/game/StarPlayerDeployment.cpp
+++ b/source/game/StarPlayerDeployment.cpp
@@ -89,7 +89,6 @@ void PlayerDeployment::render(RenderCallback* renderCallback, Vec2F const& posit
drawablePair.first.translate(position);
renderCallback->addDrawable(drawablePair.first, drawablePair.second.value(RenderLayerPlayer));
}
- renderCallback->addLightSources(m_scriptComponent.lightSources());
renderCallback->addParticles(m_scriptComponent.pullNewParticles());
for (auto audio : m_scriptComponent.pullNewAudios()) {
audio->setPosition(position);
@@ -97,4 +96,8 @@ void PlayerDeployment::render(RenderCallback* renderCallback, Vec2F const& posit
}
}
+void PlayerDeployment::renderLightSources(RenderCallback* renderCallback) {
+ renderCallback->addLightSources(m_scriptComponent.lightSources());
+}
+
}