- Fixed <Pre/Post>Morph() being called twice for monsters.

This commit is contained in:
MajorCooke 2025-06-30 09:15:30 -05:00 committed by Ricardo Luís Vaz Silva
commit 3fba33204c

View file

@ -174,9 +174,7 @@ extend class Actor
return false;
}
// [MC] Notify that we're just about to start the transfer.
PreMorph(morphed, false); // False: No longer the current.
morphed.PreMorph(self, true); // True: Becoming this actor.
// [MC] PreMorph is now called via MorphInto instead of here now.
if ((style & MRF_TRANSFERTRANSLATION) && !morphed.bDontTranslate)
morphed.Translation = Translation;
@ -292,8 +290,7 @@ extend class Actor
if (!MorphInto(alt))
return false;
PreUnmorph(alt, false);
alt.PreUnmorph(self, true);
//[MC] PreUnmorph is called by MorphInto now instead of here.
// Check to see if it had a powerup that caused it to morph.
for (Inventory item = alt.Inv; item;)