mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
Hotfix: The output from CheckReplacement no longer permanently overrides an actor's replacement.
This commit is contained in:
parent
3b8b312fae
commit
a9b25242cd
1 changed files with 2 additions and 1 deletions
|
@ -438,6 +438,7 @@ PClassActor *PClassActor::GetReplacement(bool lookskill)
|
||||||
}
|
}
|
||||||
// The Replacement field is temporarily NULLed to prevent
|
// The Replacement field is temporarily NULLed to prevent
|
||||||
// potential infinite recursion.
|
// potential infinite recursion.
|
||||||
|
PClassActor *oldrep = ActorInfo()->Replacement;
|
||||||
ActorInfo()->Replacement = nullptr;
|
ActorInfo()->Replacement = nullptr;
|
||||||
PClassActor *rep = Replacement;
|
PClassActor *rep = Replacement;
|
||||||
// Handle skill-based replacement here. It has precedence on DECORATE 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
|
// Skill replacements are not recursive, contrarily to DECORATE replacements
|
||||||
rep = rep->GetReplacement(false);
|
rep = rep->GetReplacement(false);
|
||||||
// Reset the temporarily NULLed field
|
// Reset the temporarily NULLed field
|
||||||
ActorInfo()->Replacement = Replacement;
|
ActorInfo()->Replacement = oldrep;
|
||||||
return rep;
|
return rep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue