Add more weapon weights and remove the knife when empty.
This commit is contained in:
parent
42e7b79622
commit
ef668a19d4
10 changed files with 26 additions and 10 deletions
|
@ -213,7 +213,7 @@ weapon_t w_broom =
|
|||
.id = ITEM_BROOM,
|
||||
.slot = 0,
|
||||
.slot_pos = 0,
|
||||
.weight = -10,
|
||||
.weight = 1,
|
||||
.draw = w_broom_draw,
|
||||
.holster = w_broom_holster,
|
||||
.primary = w_broom_primary,
|
||||
|
|
|
@ -349,7 +349,7 @@ weapon_t w_forks =
|
|||
.deathmsg = w_forks_deathmsg,
|
||||
.aimanim = w_forks_aimanim,
|
||||
.hudpic = w_forks_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 3,
|
||||
.isempty = w_forks_isempty,
|
||||
.type = w_forks_type
|
||||
};
|
||||
|
|
|
@ -252,7 +252,7 @@ weapon_t w_fryingpan =
|
|||
.deathmsg = w_fryingpan_deathmsg,
|
||||
.aimanim = w_fryingpan_aimanim,
|
||||
.hudpic = w_fryingpan_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 2,
|
||||
.isempty = w_fryingpan_isempty,
|
||||
.type = w_fryingpan_type
|
||||
};
|
||||
|
|
|
@ -267,7 +267,7 @@ weapon_t w_glove =
|
|||
.deathmsg = w_glove_deathmsg,
|
||||
.aimanim = w_glove_aimanim,
|
||||
.hudpic = w_glove_hudpic,
|
||||
.weight = -10,
|
||||
.weight = -1,
|
||||
.isempty = w_glove_isempty,
|
||||
.type = w_glove_type
|
||||
};
|
||||
|
|
|
@ -287,7 +287,7 @@ weapon_t w_hairspray =
|
|||
.deathmsg = w_hairspray_deathmsg,
|
||||
.aimanim = w_hairspray_aimanim,
|
||||
.hudpic = w_hairspray_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 8,
|
||||
.isempty = w_hairspray_isempty,
|
||||
.type = w_hairspray_type
|
||||
};
|
||||
|
|
|
@ -94,6 +94,12 @@ w_knife_draw(player pl)
|
|||
{
|
||||
Weapons_SetModel("models/v_knife.mdl");
|
||||
Weapons_ViewAnimation(pl, KNIFE_DRAW);
|
||||
|
||||
#ifdef SERVER
|
||||
if (!pl.ammo_knives) {
|
||||
Weapons_RemoveItem(pl, WEAPON_KNIFE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -181,6 +187,16 @@ w_knife_primary(player pl)
|
|||
void
|
||||
w_knife_release(player pl)
|
||||
{
|
||||
if (pl.w_idle_next > 0.0) {
|
||||
if (pl.w_attack_next <= 0.0) {
|
||||
#ifdef SERVER
|
||||
if (!pl.ammo_knives) {
|
||||
Weapons_RemoveItem(pl, WEAPON_KNIFE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.w_idle_next > 0.0) {
|
||||
return;
|
||||
|
@ -302,7 +318,7 @@ weapon_t w_knife =
|
|||
.deathmsg = w_knife_deathmsg,
|
||||
.aimanim = w_knife_aimanim,
|
||||
.hudpic = w_knife_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 5,
|
||||
.isempty = w_knife_isempty,
|
||||
.type = w_knife_type
|
||||
};
|
||||
|
|
|
@ -281,7 +281,7 @@ weapon_t w_lego =
|
|||
.deathmsg = w_lego_deathmsg,
|
||||
.aimanim = w_lego_aimanim,
|
||||
.hudpic = w_lego_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 7,
|
||||
.isempty = w_lego_isempty,
|
||||
.type = w_lego_type
|
||||
};
|
||||
|
|
|
@ -290,7 +290,7 @@ weapon_t w_legolauncher =
|
|||
.deathmsg = w_legolauncher_deathmsg,
|
||||
.aimanim = w_legolauncher_aimanim,
|
||||
.hudpic = w_legolauncher_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 9,
|
||||
.isempty = w_legolauncher_isempty,
|
||||
.type = w_legolauncher_type
|
||||
};
|
||||
|
|
|
@ -295,7 +295,7 @@ weapon_t w_machette =
|
|||
.deathmsg = w_machette_deathmsg,
|
||||
.aimanim = w_machette_aimanim,
|
||||
.hudpic = w_machette_hudpic,
|
||||
.weight = -10,
|
||||
.weight = -1,
|
||||
.isempty = w_machette_isempty,
|
||||
.type = w_machette_type
|
||||
};
|
||||
|
|
|
@ -346,7 +346,7 @@ weapon_t w_sodalauncher = {
|
|||
.deathmsg = w_sodalauncher_deathmsg,
|
||||
.aimanim = w_sodalauncher_aimanim,
|
||||
.hudpic = w_sodalauncher_hudpic,
|
||||
.weight = -10,
|
||||
.weight = 6,
|
||||
.isempty = w_sodalauncher_isempty,
|
||||
.type = w_sodalauncher_type
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue