Fix numLoaded leak for Anchor (#6384)
This commit is contained in:
committed by
GitHub
parent
5c8ff76554
commit
b8634f1d8b
@@ -243,4 +243,10 @@ void DummyPlayer_Draw(Actor* actor, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DummyPlayer_Destroy(Actor* actor, PlayState* play) {
|
void DummyPlayer_Destroy(Actor* actor, PlayState* play) {
|
||||||
|
// DummyPlayer Actors are initially spawned as ACTOR_PLAYER, but change their
|
||||||
|
// ID shortly afterwards to ACTOR_EN_OE2. This would cause ACTOR_PLAYER's
|
||||||
|
// ActorDB Entry's `numLoaded` to leak, which is mostly harmless but hits debug
|
||||||
|
// asserts. Set the id back to ACTOR_PLAYER so that `numLoaded` will be decremented
|
||||||
|
// correctly.
|
||||||
|
actor->id = ACTOR_PLAYER;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user