- Make player unmorphing the first thing that happens in G_PlayerFinishLevel() so that all

inventory fiddling happens on the real player and not the morphed player.

SVN r3619 (trunk)
This commit is contained in:
Randy Heit 2012-05-04 02:25:16 +00:00
parent 9d4ba3c7fd
commit 11bf757a2f

View file

@ -1208,6 +1208,11 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, int flags)
p = &players[player];
if (p->morphTics != 0)
{ // Undo morph
P_UndoPlayerMorph (p, p, 0, true);
}
// Strip all current powers, unless moving in a hub and the power is okay to keep.
item = p->mo->Inventory;
while (item != NULL)
@ -1276,11 +1281,6 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, int flags)
}
}
if (p->morphTics)
{ // Undo morph
P_UndoPlayerMorph (p, p, 0, true);
}
// Resets player health to default if not dead.
if ((flags & CHANGELEVEL_RESETHEALTH) && p->playerstate != PST_DEAD)
{