mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +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;
|
toucher = toucher->player->mo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool localview = toucher->CheckLocalView(consoleplayer);
|
||||||
|
|
||||||
if (!CallTryPickup (toucher, &toucher)) return;
|
if (!CallTryPickup (toucher, &toucher)) return;
|
||||||
|
|
||||||
// This is the only situation when a pickup flash should ever play.
|
// 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 ();
|
const char * message = PickupMessage ();
|
||||||
|
|
||||||
if (message != NULL && *message != 0 && toucher->CheckLocalView (consoleplayer)
|
if (message != NULL && *message != 0 && localview
|
||||||
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
|
&& (StaticLastMessageTic != gametic || StaticLastMessage != message))
|
||||||
{
|
{
|
||||||
StaticLastMessageTic = gametic;
|
StaticLastMessageTic = gametic;
|
||||||
|
|
Loading…
Reference in a new issue