mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- 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:
parent
ec6d522a29
commit
85d4350190
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue