WEAPON_SATCHEL: Draw satchel viewmodel again if there's no more satchels we can detonate.
This commit is contained in:
parent
120e6988c4
commit
b0dbd92aca
4 changed files with 16 additions and 13 deletions
|
@ -158,7 +158,6 @@ w_satchel_holster(player pl)
|
|||
void
|
||||
w_satchel_primary(player pl)
|
||||
{
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
}
|
||||
|
@ -184,6 +183,7 @@ w_satchel_primary(player pl)
|
|||
s_satchel_drop(pl, pl.origin, throw);
|
||||
pl.satchel_chg++;
|
||||
pl.ammo_satchel--;
|
||||
pl.mode_tempstate = 1; /* mark us as having deployed something */
|
||||
|
||||
if (pl.flags & FL_CROUCHING)
|
||||
Animation_PlayerTop(pl, ANIM_CR_SHOOTSQUEAK, 0.41f);
|
||||
|
@ -218,7 +218,6 @@ w_satchel_primary(player pl)
|
|||
void
|
||||
w_satchel_secondary(player pl)
|
||||
{
|
||||
|
||||
if (pl.w_attack_next) {
|
||||
return;
|
||||
}
|
||||
|
@ -245,9 +244,10 @@ w_satchel_secondary(player pl)
|
|||
|
||||
pl.satchel_chg++;
|
||||
pl.ammo_satchel--;
|
||||
pl.mode_tempstate = 1; /* mark us as having deployed something */
|
||||
|
||||
pl.w_attack_next = 1.0f;
|
||||
pl.w_idle_next = 2.5f;
|
||||
pl.w_idle_next = 0.5f;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -259,11 +259,19 @@ w_satchel_reload(player pl)
|
|||
void
|
||||
w_satchel_release(player pl)
|
||||
{
|
||||
|
||||
if (pl.w_idle_next > 0.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* keep track of the model via tempstates */
|
||||
if (pl.satchel_chg < 1i && pl.mode_tempstate != 0) {
|
||||
pl.mode_tempstate = 0;
|
||||
Weapons_SetModel("models/v_satchel.mdl");
|
||||
Weapons_ViewAnimation(pl, SATCHEL_DRAW);
|
||||
pl.w_idle_next = 15.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.satchel_chg <= 0) {
|
||||
Weapons_ViewAnimation(pl, SATCHEL_FIDGET);
|
||||
} else {
|
||||
|
|
|
@ -124,7 +124,6 @@ int
|
|||
w_shotgun_pickup(player pl, int new, int startammo)
|
||||
{
|
||||
#ifdef SERVER
|
||||
|
||||
if (new) {
|
||||
pl.shotgun_mag = 8;
|
||||
return (1);
|
||||
|
@ -160,7 +159,6 @@ void w_shotgun_release(player pl);
|
|||
void
|
||||
w_shotgun_reload(player pl)
|
||||
{
|
||||
|
||||
if (pl.shotgun_mag >= 8) {
|
||||
return;
|
||||
}
|
||||
|
@ -308,7 +306,6 @@ w_shotgun_secondary(player pl)
|
|||
void
|
||||
w_shotgun_release(player pl)
|
||||
{
|
||||
|
||||
/* auto-reload if need be */
|
||||
if (pl.w_attack_next <= 0.0)
|
||||
if (pl.mode_tempstate == SHOTTY_IDLE && pl.shotgun_mag == 0 && pl.ammo_buckshot > 0) {
|
||||
|
@ -416,7 +413,6 @@ w_shotgun_hudpic(player pl, int selected, vector pos, float a)
|
|||
int
|
||||
w_shotgun_isempty(player pl)
|
||||
{
|
||||
|
||||
if (pl.shotgun_mag <= 0 && pl.ammo_buckshot <= 0)
|
||||
return 1;
|
||||
|
||||
|
|
|
@ -213,14 +213,17 @@ void w_snark_primary(player pl)
|
|||
pl.w_attack_next = 0.25f;
|
||||
|
||||
}
|
||||
|
||||
void w_snark_secondary(player pl)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void w_snark_reload(player pl)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void w_snark_release(player pl)
|
||||
{
|
||||
int r;
|
||||
|
@ -298,7 +301,6 @@ void w_snark_hud(player pl)
|
|||
void w_snark_hudpic(player pl, int selected, vector pos, float a)
|
||||
{
|
||||
#ifdef CLIENT
|
||||
|
||||
if (selected) {
|
||||
drawsubpic(pos, [170,45], g_hud6_spr,
|
||||
[0,135/256], [170/256,45/256],
|
||||
|
|
|
@ -305,7 +305,6 @@ w_tripmine_primary(player pl)
|
|||
void
|
||||
w_tripmine_release(player pl)
|
||||
{
|
||||
|
||||
if (pl.w_idle_next > 0.0) {
|
||||
return;
|
||||
}
|
||||
|
@ -360,7 +359,6 @@ void
|
|||
w_tripmine_hudpic(player pl, int selected, vector pos, float a)
|
||||
{
|
||||
#ifdef CLIENT
|
||||
|
||||
if (selected) {
|
||||
drawsubpic(pos, [170,45], g_hud6_spr, [0,90/256], [170/256,45/256], g_hud_color, a, DRAWFLAG_ADDITIVE);
|
||||
} else {
|
||||
|
@ -374,7 +372,6 @@ w_tripmine_hudpic(player pl, int selected, vector pos, float a)
|
|||
int
|
||||
w_tripmine_isempty(player pl)
|
||||
{
|
||||
|
||||
if (pl.ammo_tripmine <= 0)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue