Skip to content

Commit 0b0e538

Browse files
committed
Fix dangling daMyna_c file-statics across scenes
1 parent 65e2987 commit 0b0e538

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/d/actor/d_a_myna.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,18 @@ int daMyna_c::destroy() {
363363
mpMorf->stopZelAnime();
364364
}
365365

366+
#ifdef TARGET_PC
367+
// !@bug d_a_myna.rel unload used to zero these file-statics; with static linking they dangle across scenes.
368+
daMyna_LightActor = NULL;
369+
daMyna_evtTagActor0 = NULL;
370+
daMyna_evtTagActor1 = NULL;
371+
daMyna_actor_count = 0;
372+
for (int i = 0; i < 10; i++) {
373+
daMyna_targetActor[i] = NULL;
374+
daMyna_subActor[i] = NULL;
375+
}
376+
#endif
377+
366378
#if DEBUG
367379
l_HOSTIO.removeHIO();
368380
#endif

0 commit comments

Comments
 (0)