Added TRANSFERTRANSLATION morph flag
This commit is contained in:
parent
a1a0bdefff
commit
69a00ddabb
4 changed files with 11 additions and 0 deletions
|
|
@ -81,6 +81,10 @@ bool P_MorphPlayer (player_t *activator, player_t *p, PClassPlayerPawn *spawntyp
|
|||
morphed = static_cast<APlayerPawn *>(Spawn (spawntype, actor->Pos(), NO_REPLACE));
|
||||
EndAllPowerupEffects(actor->Inventory);
|
||||
DObject::StaticPointerSubstitution (actor, morphed);
|
||||
if ((style & MORPH_TRANSFERTRANSLATION) && !(morphed->flags2 & MF2_DONTTRANSLATE))
|
||||
{
|
||||
morphed->Translation = actor->Translation;
|
||||
}
|
||||
if ((actor->tid != 0) && (style & MORPH_NEWTIDBEHAVIOUR))
|
||||
{
|
||||
morphed->tid = actor->tid;
|
||||
|
|
@ -382,6 +386,10 @@ bool P_MorphMonster (AActor *actor, PClassActor *spawntype, int duration, int st
|
|||
|
||||
morphed = static_cast<AMorphedMonster *>(Spawn (spawntype, actor->Pos(), NO_REPLACE));
|
||||
DObject::StaticPointerSubstitution (actor, morphed);
|
||||
if ((style & MORPH_TRANSFERTRANSLATION) && !(morphed->flags2 & MF2_DONTTRANSLATE))
|
||||
{
|
||||
morphed->Translation = actor->Translation;
|
||||
}
|
||||
morphed->tid = actor->tid;
|
||||
morphed->Angles.Yaw = actor->Angles.Yaw;
|
||||
morphed->UnmorphedMe = actor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue