aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-20 14:33:08 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-20 14:33:08 +0100
commitd623b13dab63408cf5e99dbc453636f174bc6fe8 (patch)
treeb79bc7826adff02e7b3c8a2778370022182f4943 /src/crepe/system
parent3344e0df01435be903e38ccbd3b9cee608d574e7 (diff)
fixxed bug with particleemiiter and sprite in single component
Diffstat (limited to 'src/crepe/system')
-rw-r--r--src/crepe/system/RenderSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp
index 28bcf56..c137de1 100644
--- a/src/crepe/system/RenderSystem.cpp
+++ b/src/crepe/system/RenderSystem.cpp
@@ -36,10 +36,10 @@ bool RenderSystem::render_particle(const Sprite & sprite, const double & scale)
bool rendering_particles = false;
for (const ParticleEmitter & em : emitters) {
+ if (!(&em.data.sprite == &sprite)) continue;
+ rendering_particles = true;
if (!em.active) continue;
- if (!(em.data.sprite.game_object_id == sprite.game_object_id)) continue;
- rendering_particles = true;
for (const Particle & p : em.data.particles) {
if (!p.active) continue;