mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +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
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue