From 235934714fca427bacaa92c0eae393b06c7f6045 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Sun, 17 Apr 2022 20:16:27 -0500 Subject: [PATCH] honor the logic in the lua script --- dScripts/WhFans.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dScripts/WhFans.cpp b/dScripts/WhFans.cpp index dffedc14..c6c798d9 100644 --- a/dScripts/WhFans.cpp +++ b/dScripts/WhFans.cpp @@ -10,7 +10,11 @@ void WhFans::OnStartup(Entity* self) { } void WhFans::ToggleFX(Entity* self, bool hit) { - std::string fanGroup = self->GetGroups()[0]; + try { + std::string fanGroup = self->GetGroups()[0]; + } catch(...) { + std::string fanGroup = "" + } Game::logger->Log("WhFans", "Toggling FX for Fan Group(%s)\n", fanGroup.c_str()); std::vector fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup);