Print weapon name tag when switching with "slot" command (#1048)

This commit is contained in:
Nash Muhandes 2020-03-14 20:17:04 +08:00 committed by GitHub
parent 7a141f3aa3
commit 2edbbac759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -313,6 +313,13 @@ CCMD (slot)
VMCall(func, param, 3, &ret, 1);
}
}
// [Nash] Option to display the name of the weapon being switched to.
if (SendItemUse != players[consoleplayer].ReadyWeapon && (displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('W', 'E', 'P', 'N'));
}
}
}