aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/RenderSystem.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-14 20:18:19 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-14 20:18:19 +0100
commite25aa67c4263b3a940ae9e92f2fcd31a4486f407 (patch)
tree58da786958ce45cdd1b6279772227a288c73c906 /src/crepe/system/RenderSystem.cpp
parent032f8560b91b76cad5f32a6a9ebfc0ac845ed69a (diff)
adjusted based on feedback of PR#31
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r--src/crepe/system/RenderSystem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index 17a2337..6ecd604 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -85,13 +85,13 @@ void RenderSystem::render() {
auto sprites = mgr.get_components_by_type<Sprite>();
for (const Sprite & sprite : sprites) {
if (!sprite.active) continue;
- auto transform = mgr.get_components_by_id<Transform>(sprite.game_object_id);
+ auto transform = mgr.get_components_by_id<Transform>(sprite.game_object_id).front().get();
- bool rendered_particles = this->render_particle(sprite, transform[0].get());
+ bool rendered_particles = this->render_particle(sprite, transform);
if (rendered_particles) continue;
- this->render_normal(sprite, transform[0].get());
+ this->render_normal(sprite, transform);
}
}