- Added MORPH_UNDOALWAYS for morph powerups.

This commit is contained in:
MajorCooke 2015-04-03 12:16:27 -05:00
parent 6c603b3c78
commit 087d564343
4 changed files with 4 additions and 1 deletions

View file

@ -1922,7 +1922,7 @@ void APowerMorph::EndEffect( )
if (!bNoCallUndoMorph) if (!bNoCallUndoMorph)
{ {
int savedMorphTics = Player->morphTics; int savedMorphTics = Player->morphTics;
P_UndoPlayerMorph (Player, Player); P_UndoPlayerMorph (Player, Player, 0, !!(Player->MorphStyle & MORPH_UNDOALWAYS));
// Abort if unmorph failed; in that case, // Abort if unmorph failed; in that case,
// set the usual retry timer and return. // set the usual retry timer and return.

View file

@ -24,6 +24,7 @@ enum
MORPH_UNDOBYDEATHFORCED = 0x00000400, // Actor (if unmorphed when killed) forces unmorph (not very useful with UNDOBYDEATHSAVES) 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_UNDOBYDEATHSAVES = 0x00000800, // Actor (if unmorphed when killed) regains their health and doesn't die
MORPH_UNDOBYTIMEOUT = 0x00001000, // Player unmorphs once countdown expires 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, MORPH_STANDARDUNDOING = MORPH_UNDOBYTOMEOFPOWER | MORPH_UNDOBYCHAOSDEVICE | MORPH_UNDOBYTIMEOUT,
}; };

View file

@ -526,6 +526,7 @@ static int ParseMorphStyle (FScanner &sc)
{ "MRF_UNDOBYDEATH", MORPH_UNDOBYDEATH}, { "MRF_UNDOBYDEATH", MORPH_UNDOBYDEATH},
{ "MRF_UNDOBYDEATHFORCED", MORPH_UNDOBYDEATHFORCED}, { "MRF_UNDOBYDEATHFORCED", MORPH_UNDOBYDEATHFORCED},
{ "MRF_UNDOBYDEATHSAVES", MORPH_UNDOBYDEATHSAVES}, { "MRF_UNDOBYDEATHSAVES", MORPH_UNDOBYDEATHSAVES},
{ "MRF_UNDOALWAYS", MORPH_UNDOALWAYS },
{ NULL, 0 } { NULL, 0 }
}; };

View file

@ -140,6 +140,7 @@ const int MRF_NEWTIDBEHAVIOUR = 256;
const int MRF_UNDOBYDEATH = 512; const int MRF_UNDOBYDEATH = 512;
const int MRF_UNDOBYDEATHFORCED = 1024; const int MRF_UNDOBYDEATHFORCED = 1024;
const int MRF_UNDOBYDEATHSAVES = 2048; const int MRF_UNDOBYDEATHSAVES = 2048;
const int MRF_UNDOALWAYS = 4096;
// Flags for A_RailAttack and A_CustomRailgun // Flags for A_RailAttack and A_CustomRailgun
const int RGF_SILENT = 1; const int RGF_SILENT = 1;