From 6cef7a437aef98758c2cc6c4c840291b1fcdbded Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Sun, 17 Apr 2022 20:24:19 -0500 Subject: [PATCH] scope --- dScripts/WhFans.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dScripts/WhFans.cpp b/dScripts/WhFans.cpp index fe1aa01a..ccf556be 100644 --- a/dScripts/WhFans.cpp +++ b/dScripts/WhFans.cpp @@ -10,10 +10,11 @@ void WhFans::OnStartup(Entity* self) { } void WhFans::ToggleFX(Entity* self, bool hit) { + std::string fanGroup = "" try { - std::string fanGroup = self->GetGroups()[0]; + fanGroup = self->GetGroups()[0]; } catch(...) { - std::string fanGroup = ""; + fanGroup = ""; } Game::logger->Log("WhFans", "Toggling FX for Fan Group(%s)\n", fanGroup.c_str());