mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
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.
This commit is contained in:
parent
091dff9b59
commit
e8065c8b5a
1 changed files with 12 additions and 0 deletions
12
src/g_cmds.c
12
src/g_cmds.c
|
@ -795,6 +795,12 @@ Cmd_WeapPrev_f(edict_t *ent)
|
||||||
|
|
||||||
if (cl->newweapon == it)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,6 +857,12 @@ Cmd_WeapNext_f(edict_t *ent)
|
||||||
|
|
||||||
if (cl->newweapon == it)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue