diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 14b2704355..8ac35f8405 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -1922,7 +1922,7 @@ void APowerMorph::EndEffect( ) if (!bNoCallUndoMorph) { int savedMorphTics = Player->morphTics; - P_UndoPlayerMorph (Player, Player); + P_UndoPlayerMorph (Player, Player, 0, !!(Player->MorphStyle & MORPH_UNDOALWAYS)); // Abort if unmorph failed; in that case, // set the usual retry timer and return. diff --git a/src/g_shared/a_morph.h b/src/g_shared/a_morph.h index e86332b3dd..9272901dd2 100644 --- a/src/g_shared/a_morph.h +++ b/src/g_shared/a_morph.h @@ -24,6 +24,7 @@ enum MORPH_UNDOBYDEATHFORCED = 0x00000400, // Actor (if unmorphed when killed) forces unmorph (not very useful with UNDOBYDEATHSAVES) MORPH_UNDOBYDEATHSAVES = 0x00000800, // Actor (if unmorphed when killed) regains their health and doesn't die MORPH_UNDOBYTIMEOUT = 0x00001000, // Player unmorphs once countdown expires + MORPH_UNDOALWAYS = 0x00002000, // Powerups must always unmorph, no matter what. MORPH_STANDARDUNDOING = MORPH_UNDOBYTOMEOFPOWER | MORPH_UNDOBYCHAOSDEVICE | MORPH_UNDOBYTIMEOUT, }; diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index 88e6084b64..61922feaf9 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -526,6 +526,7 @@ static int ParseMorphStyle (FScanner &sc) { "MRF_UNDOBYDEATH", MORPH_UNDOBYDEATH}, { "MRF_UNDOBYDEATHFORCED", MORPH_UNDOBYDEATHFORCED}, { "MRF_UNDOBYDEATHSAVES", MORPH_UNDOBYDEATHSAVES}, + { "MRF_UNDOALWAYS", MORPH_UNDOALWAYS }, { NULL, 0 } }; diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index e6434a08ea..2ded98bc77 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -140,6 +140,7 @@ const int MRF_NEWTIDBEHAVIOUR = 256; const int MRF_UNDOBYDEATH = 512; const int MRF_UNDOBYDEATHFORCED = 1024; const int MRF_UNDOBYDEATHSAVES = 2048; +const int MRF_UNDOALWAYS = 4096; // Flags for A_RailAttack and A_CustomRailgun const int RGF_SILENT = 1;