From a9b25242cdfe28804ff77d28fa12dae103bd401d Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sun, 23 Sep 2018 23:34:20 +0200 Subject: [PATCH] Hotfix: The output from CheckReplacement no longer permanently overrides an actor's replacement. --- src/info.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/info.cpp b/src/info.cpp index 0ff3928cd6..ffae037f74 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -438,6 +438,7 @@ PClassActor *PClassActor::GetReplacement(bool lookskill) } // The Replacement field is temporarily NULLed to prevent // potential infinite recursion. + PClassActor *oldrep = ActorInfo()->Replacement; ActorInfo()->Replacement = nullptr; PClassActor *rep = Replacement; // Handle skill-based replacement here. It has precedence on DECORATE replacement @@ -451,7 +452,7 @@ PClassActor *PClassActor::GetReplacement(bool lookskill) // Skill replacements are not recursive, contrarily to DECORATE replacements rep = rep->GetReplacement(false); // Reset the temporarily NULLed field - ActorInfo()->Replacement = Replacement; + ActorInfo()->Replacement = oldrep; return rep; }