Added CheckReplacee.
- Allows defining of what actor is replacing another for information. - If multiple arachnotrons, a modder can attribute them as being a replacer of Arachnotron itself, allowing A_BossDeath and GetReplacee to work with it.
This commit is contained in:
parent
b9e71d6db3
commit
b1c508fa6c
4 changed files with 56 additions and 1 deletions
10
src/info.cpp
10
src/info.cpp
|
|
@ -593,6 +593,16 @@ PClassActor *PClassActor::GetReplacee(bool lookskill)
|
|||
}
|
||||
}
|
||||
PClassActor *savedrep = ActorInfo()->Replacee;
|
||||
// [MC] Same code as CheckReplacement but turned around so modders can indicate
|
||||
// what monsters spawn from which entity. I.e. instead of a randomspawner
|
||||
// showing up, one can assign an Arachnotron as the one being replaced
|
||||
// so functions like CheckReplacee and A_BossDeath can actually work, given
|
||||
// modders set it up that way.
|
||||
if (E_CheckReplacee(&savedrep, this))
|
||||
{
|
||||
// [MK] the replacement is final, so don't continue with the chain
|
||||
return savedrep ? savedrep : this;
|
||||
}
|
||||
if (savedrep == nullptr && (!lookskill || skillrepname == NAME_None))
|
||||
{
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue