From 4c9d39aa43c354366e9b503a376e85cb748526ce Mon Sep 17 00:00:00 2001 From: Joao Pasqualini Costa Date: Mon, 13 Nov 2023 19:21:05 -0300 Subject: [PATCH] improve --- src/client/attachedeffect.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/client/attachedeffect.cpp b/src/client/attachedeffect.cpp index 1b09f59b01..dd7724bc13 100644 --- a/src/client/attachedeffect.cpp +++ b/src/client/attachedeffect.cpp @@ -52,12 +52,8 @@ void AttachedEffect::draw(const Point& dest, bool isOnTop, LightView* lightView) const int animation = getCurrentAnimationPhase(); if (m_loop > -1 && animation != m_lastAnimation) { m_lastAnimation = animation; - if (animation == 0) { - --m_loop; - - if (m_frame == 0 && m_loop == 0) - return; - } + if (animation == 0 && --m_loop == 0) + return; } if (m_shader) g_drawPool.setShaderProgram(m_shader, true);