Graf Zahl wrote:I'll be honest here: I like the feature but the implementation is giving me headaches. There's just too much replacement going on with replaced actors being replaced again. Unless this is clearly defined and properly handled I'll leave it out. 'Properly handled' to me means that there's only one function in the entire source that handles all of this.
Now that I look back on it, changing just the way FActorInfo::GetReplacement() works would be the best approach as it would be that single function that handles all of it. (Well, we also need the other way around for A_BossDeath, so GetReplacee() too.)
Now for clearly defined: what should happen if I have this:
Code: Select all
Skill someskill
blah
ReplaceActor(ZombieMan, ShotgunGuy)
ReplaceActor(ShotgunGuy, ChaingunGuy)
With the existing Replaces system, logically we'd get ZombieMan replaced by ChaingunGuy, which is in my opinion not a desirable effect here. We probably want sergeants to be still spawnable, as replacements of the former humans.
Now what if the above code is combined with that in DECORATE:
Code: Select all
Actor Poss2 : ZombieMan replaces ZombieMan { blah }
Actor SPos2 : ShotgunGuy replaces ShotgunGuy { blah }
Actor CPos2 : ChaingunGuy replaces ChaingunGuy { blah }
In my opinion again, we should have ZombieMan replaced by SPos2 and ShotgunGuy replaced by CPos2.
In other words: first apply the skill replacements, and then apply the DECORATE replacements to it. That's what I think would be the most useful behavior.
Graf Zahl wrote:And why is it necessary to hack FDoomEdMap::FindType?
Well, it was that or P_SpawnMapThing because P_SMT calls Spawn with NO_REPLACE. I agree that the latter would have been better, I overlooked the part of it which contains the DECORATE replacement code. Either way, the patch as it is now was intended to get feedback, not for submission (I would have requested a move to Code Submission otherwise).
[quote="Graf Zahl"]I'll be honest here: I like the feature but the implementation is giving me headaches. There's just too much replacement going on with replaced actors being replaced again. Unless this is clearly defined and properly handled I'll leave it out. 'Properly handled' to me means that there's only one function in the entire source that handles all of this.[/quote]
Now that I look back on it, changing just the way FActorInfo::GetReplacement() works would be the best approach as it would be that single function that handles all of it. (Well, we also need the other way around for A_BossDeath, so GetReplacee() too.)
Now for clearly defined: what should happen if I have this:
[code]Skill someskill
blah
ReplaceActor(ZombieMan, ShotgunGuy)
ReplaceActor(ShotgunGuy, ChaingunGuy)[/code]
With the existing Replaces system, logically we'd get ZombieMan replaced by ChaingunGuy, which is in my opinion not a desirable effect here. We probably want sergeants to be still spawnable, as replacements of the former humans.
Now what if the above code is combined with that in DECORATE:
[code]Actor Poss2 : ZombieMan replaces ZombieMan { blah }
Actor SPos2 : ShotgunGuy replaces ShotgunGuy { blah }
Actor CPos2 : ChaingunGuy replaces ChaingunGuy { blah }[/code]
In my opinion again, we should have ZombieMan replaced by SPos2 and ShotgunGuy replaced by CPos2.
In other words: first apply the skill replacements, and then apply the DECORATE replacements to it. That's what I think would be the most useful behavior.
[quote="Graf Zahl"]And why is it necessary to hack FDoomEdMap::FindType?[/quote]
Well, it was that or P_SpawnMapThing because P_SMT calls Spawn with NO_REPLACE. I agree that the latter would have been better, I overlooked the part of it which contains the DECORATE replacement code. Either way, the patch as it is now was intended to get feedback, not for submission (I would have requested a move to Code Submission otherwise).