Merge pull request #304 from MajorCooke/morphundoalways

- Added MORPH_UNDOALWAYS for morph powerups.
This commit is contained in:
coelckers 2015-04-30 09:05:41 +02:00
commit 691855e19b
4 changed files with 4 additions and 1 deletions

View file

@ -1923,7 +1923,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.

View file

@ -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,
};

View file

@ -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 }
};

View file

@ -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;