From 95a40eef13432c374ad58ebdedd240827710ceeb Mon Sep 17 00:00:00 2001 From: Jaime Moreira Date: Sat, 16 Dec 2023 17:53:25 -0300 Subject: [PATCH] Preview of the coming weapon for weapprev/weapnext The weapon you are changing to appears in the HUD, in "pickup" format. Requires g_quick_weap == 1. --- src/g_cmds.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/g_cmds.c b/src/g_cmds.c index 84dff6e..ce0bba9 100644 --- a/src/g_cmds.c +++ b/src/g_cmds.c @@ -766,6 +766,12 @@ Cmd_WeapPrev_f(edict_t *ent) /* prevent scrolling through ALL weapons */ if (cl->newweapon == it) { + if (g_quick_weap->value) + { + cl->ps.stats[STAT_PICKUP_ICON] = gi.imageindex(cl->newweapon->icon); + cl->ps.stats[STAT_PICKUP_STRING] = CS_ITEMS + ITEM_INDEX(cl->newweapon); + cl->pickup_msg_time = level.time + 0.9f; + } return; } } @@ -824,6 +830,12 @@ Cmd_WeapNext_f(edict_t *ent) /* prevent scrolling through ALL weapons */ if (cl->newweapon == it) { + if (g_quick_weap->value) + { + cl->ps.stats[STAT_PICKUP_ICON] = gi.imageindex(cl->newweapon->icon); + cl->ps.stats[STAT_PICKUP_STRING] = CS_ITEMS + ITEM_INDEX(cl->newweapon); + cl->pickup_msg_time = level.time + 0.9f; + } return; } }