undo.ReplaceEntity
Description
Replaces any instance of the "from" reference with the "to" reference, in any existing undo block.
You very likely want to call cleanup.ReplaceEntity with the same entities as well.
Arguments
2 Entity to
The new entity to replace the old one. Can also be a
NULL
to remove the entity from the undo system.Returns
Example
When an entity is ragdolled, this will replace any instances of the entity with it's ragdoll.