From 85d4350190f1abdc4d3d05ba155f4070cefac4f7 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 9 Apr 2013 22:24:18 +0000 Subject: [PATCH] - Fixed: AInventory::Touch() should check for a local player view before trying the pickup, because if it's a morph powerup, after being picked up, the toucher this function received will no longer be the active player. SVN r4211 (trunk) --- src/g_shared/a_pickups.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index 1ed5b4919..89bfe3086 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -938,6 +938,8 @@ void AInventory::Touch (AActor *toucher) toucher = toucher->player->mo; } + bool localview = toucher->CheckLocalView(consoleplayer); + if (!CallTryPickup (toucher, &toucher)) return; // This is the only situation when a pickup flash should ever play. @@ -950,7 +952,7 @@ void AInventory::Touch (AActor *toucher) { const char * message = PickupMessage (); - if (message != NULL && *message != 0 && toucher->CheckLocalView (consoleplayer) + if (message != NULL && *message != 0 && localview && (StaticLastMessageTic != gametic || StaticLastMessage != message)) { StaticLastMessageTic = gametic;