Don't draw weapon tags when player tries to switch weapons while they're dead

This commit is contained in:
nashmuhandes 2020-03-25 21:15:55 +08:00 committed by Christoph Oelckers
parent ecb3ff0977
commit f954df7a00

View file

@ -315,6 +315,7 @@ CCMD (slot)
} }
// [Nash] Option to display the name of the weapon being switched to. // [Nash] Option to display the name of the weapon being switched to.
if (players[consoleplayer].playerstate != PST_LIVE) return;
if (SendItemUse != players[consoleplayer].ReadyWeapon && (displaynametags & 2) && StatusBar && SmallFont && SendItemUse) if (SendItemUse != players[consoleplayer].ReadyWeapon && (displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{ {
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(), StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
@ -363,6 +364,7 @@ CCMD (weapnext)
} }
// [BC] Option to display the name of the weapon being cycled to. // [BC] Option to display the name of the weapon being cycled to.
if (players[consoleplayer].playerstate != PST_LIVE) return;
if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse) if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{ {
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(), StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
@ -389,6 +391,7 @@ CCMD (weapprev)
} }
// [BC] Option to display the name of the weapon being cycled to. // [BC] Option to display the name of the weapon being cycled to.
if (players[consoleplayer].playerstate != PST_LIVE) return;
if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse) if ((displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{ {
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(), StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),