From b0b1978c76d4c7fcb284052ec75cd86b70023921 Mon Sep 17 00:00:00 2001 From: Howard Luck Date: Wed, 15 Apr 2026 10:52:30 -0600 Subject: [PATCH] Fix dangling daMyna_c file-statics across scenes (#392) --- src/d/actor/d_a_myna.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index b23845a922..776f219f93 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -363,6 +363,18 @@ int daMyna_c::destroy() { mpMorf->stopZelAnime(); } +#ifdef TARGET_PC + // !@bug d_a_myna.rel unload used to zero these file-statics; with static linking they dangle across scenes. + daMyna_LightActor = NULL; + daMyna_evtTagActor0 = NULL; + daMyna_evtTagActor1 = NULL; + daMyna_actor_count = 0; + for (int i = 0; i < 10; i++) { + daMyna_targetActor[i] = NULL; + daMyna_subActor[i] = NULL; + } +#endif + #if DEBUG l_HOSTIO.removeHIO(); #endif