- Changed decorate replacement to be opt-in instead of opt-out. This allows for
greater flexibility in what can be replaced (replaced actors need not be ancestors
of actors that replace them) at the expense of not having universal actor
replacement. Instances where replacements work:
- Line specials that spawn things (Thing_Spawn and related)
- ACS spawning commands (SpawnSpot and the like)
- Spawning mapthings at level load time in P_SpawnMapThing()
- Spawning items off of dead dudes in P_DropItem()
- The A_SpawnItem decorate function
- The summon and summonfriend console commands
- ThingCount will count both original actors and their replacements as the same
things.
TBD: Should the ACS inventory functions use replacements too, or not?
SVN r249 (trunk)
This commit is contained in:
parent
56427d1b1c
commit
38a073626f
8 changed files with 52 additions and 26 deletions
|
|
@ -1305,10 +1305,6 @@ static FActorInfo * CreateNewActor(FActorInfo ** parentc, Baggage *bag)
|
|||
{
|
||||
SC_ScriptError ("Replaced type '%s' is not an actor", sc_String);
|
||||
}
|
||||
else if (!ti->IsDescendantOf (replacee))
|
||||
{
|
||||
SC_ScriptError ("'%s' must be derived from '%s' to replace it", typeName.GetChars(), sc_String);
|
||||
}
|
||||
replacee->ActorInfo->Replacement = ti->ActorInfo;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue