From 11bf757a2f85f1c6cfc5ebbdd6906de79523869a Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 4 May 2012 02:25:16 +0000 Subject: [PATCH] - 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) --- src/g_game.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index a967577c9..e0752d96a 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -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) {