From 6c4a31df7014f62575884bd61a168cb3884f63f3 Mon Sep 17 00:00:00 2001 From: BananaBolt Date: Tue, 9 Apr 2019 04:37:02 +0930 Subject: [PATCH] Fix visual bug with multiple instance of sun ray Fix bug with multiple instances of sun ray causing the particles to not get destroyed on sun ray end. pfx was being saved as global value instead of local, thus when a new instance of sun ray was created it would overwrite the old pfx causing the old particles to never be destroyed. --- game/scripts/vscripts/heroes/hero_phoenix/sun_ray.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/scripts/vscripts/heroes/hero_phoenix/sun_ray.lua b/game/scripts/vscripts/heroes/hero_phoenix/sun_ray.lua index f19403f3..2ec9ec3d 100644 --- a/game/scripts/vscripts/heroes/hero_phoenix/sun_ray.lua +++ b/game/scripts/vscripts/heroes/hero_phoenix/sun_ray.lua @@ -41,7 +41,7 @@ function CastSunRay( event ) -- Create particle FX local particleName = "particles/units/heroes/hero_phoenix/phoenix_sunray.vpcf" - pfx = ParticleManager:CreateParticle( particleName, PATTACH_ABSORIGIN_FOLLOW, caster ) + local pfx = ParticleManager:CreateParticle( particleName, PATTACH_ABSORIGIN_FOLLOW, caster ) ParticleManager:SetParticleControlEnt( pfx, 0, caster, PATTACH_POINT_FOLLOW, "attach_hitloc", caster:GetAbsOrigin(), true ) -- Attach a loop sound to the endcap @@ -329,4 +329,4 @@ end ]] function StopSound( event ) StopSoundEvent( event.sound_name, event.caster ) -end \ No newline at end of file +end