- Do copy a monster's special to its morphed version so that it can be properly restored when

it unmorphs.

SVN r4212 (trunk)
This commit is contained in:
Randy Heit 2013-04-09 22:40:27 +00:00
parent 85d4350190
commit f7c55c0936

View file

@ -394,8 +394,8 @@ bool P_MorphMonster (AActor *actor, const PClass *spawntype, int duration, int s
morphed->MorphStyle = style; morphed->MorphStyle = style;
morphed->MorphExitFlash = (exit_flash) ? exit_flash : RUNTIME_CLASS(ATeleportFog); morphed->MorphExitFlash = (exit_flash) ? exit_flash : RUNTIME_CLASS(ATeleportFog);
morphed->FlagsSave = actor->flags & ~MF_JUSTHIT; morphed->FlagsSave = actor->flags & ~MF_JUSTHIT;
//morphed->special = actor->special; morphed->special = actor->special;
//memcpy (morphed->args, actor->args, sizeof(actor->args)); memcpy (morphed->args, actor->args, sizeof(actor->args));
morphed->CopyFriendliness (actor, true); morphed->CopyFriendliness (actor, true);
morphed->flags |= actor->flags & MF_SHADOW; morphed->flags |= actor->flags & MF_SHADOW;
morphed->flags3 |= actor->flags3 & MF3_GHOST; morphed->flags3 |= actor->flags3 & MF3_GHOST;
@ -405,6 +405,7 @@ bool P_MorphMonster (AActor *actor, const PClass *spawntype, int duration, int s
} }
morphed->AddToHash (); morphed->AddToHash ();
actor->RemoveFromHash (); actor->RemoveFromHash ();
actor->special = 0;
actor->tid = 0; actor->tid = 0;
actor->flags &= ~(MF_SOLID|MF_SHOOTABLE); actor->flags &= ~(MF_SOLID|MF_SHOOTABLE);
actor->flags |= MF_UNMORPHED; actor->flags |= MF_UNMORPHED;