- 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)
This commit is contained in:
Randy Heit 2013-04-09 22:24:18 +00:00
parent ec6d522a29
commit 85d4350190
1 changed files with 3 additions and 1 deletions

View File

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