mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 15:17:57 -05:00
Ballistic Knife: projectiles are no longer destroyed when purchasing a melee wallbuy
Ballistic Knife: fix projectiles not being able to be picked up after purchasing melee wallbuy Ballistic Knife: remove max ammo being given when buying a melee wallbuy
This commit is contained in:
@ -111,6 +111,7 @@ main()
|
||||
replaceFunc(maps\mp\zombies\_zm_melee_weapon::give_melee_weapon, scripts\zm\replaced\_zm_melee_weapon::give_melee_weapon);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_ballistic_knife::init, scripts\zm\replaced\_zm_weap_ballistic_knife::init);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_ballistic_knife::watch_use_trigger, scripts\zm\replaced\_zm_weap_ballistic_knife::watch_use_trigger);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_ballistic_knife::pick_up, scripts\zm\replaced\_zm_weap_ballistic_knife::pick_up);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_claymore::claymore_detonation, scripts\zm\replaced\_zm_weap_claymore::claymore_detonation);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_claymore::claymore_setup, scripts\zm\replaced\_zm_weap_claymore::claymore_setup);
|
||||
replaceFunc(maps\mp\zombies\_zm_weap_cymbal_monkey::player_handle_cymbal_monkey, scripts\zm\replaced\_zm_weap_cymbal_monkey::player_handle_cymbal_monkey);
|
||||
|
@ -129,7 +129,6 @@ change_melee_weapon(weapon_name, current_weapon)
|
||||
old_ballistic = primary_weapon;
|
||||
ballistic_ammo_clip = self getWeaponAmmoClip(primary_weapon);
|
||||
ballistic_ammo_stock = self getWeaponAmmoStock(primary_weapon);
|
||||
self notify("zmb_lost_knife");
|
||||
self takeweapon(primary_weapon);
|
||||
unacquire_weapon_toggle(primary_weapon);
|
||||
|
||||
@ -167,7 +166,8 @@ change_melee_weapon(weapon_name, current_weapon)
|
||||
self giveweapon(new_ballistic, 0);
|
||||
}
|
||||
|
||||
self giveMaxAmmo(new_ballistic);
|
||||
self setweaponammoclip(new_ballistic, ballistic_ammo_clip);
|
||||
self setweaponammostock(new_ballistic, ballistic_ammo_stock);
|
||||
self seteverhadweaponall(1);
|
||||
}
|
||||
|
||||
|
@ -141,4 +141,44 @@ watch_use_trigger(trigger, model, callback, weapon, playersoundonuse, npcsoundon
|
||||
player thread [[callback]](weapon, model, trigger);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
pick_up( weapon, model, trigger )
|
||||
{
|
||||
if (!self hasweapon(weapon))
|
||||
{
|
||||
foreach (primary in self getweaponslistprimaries())
|
||||
{
|
||||
if (issubstr(primary, "knife_ballistic"))
|
||||
{
|
||||
weapon = primary;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
current_weapon = self getcurrentweapon();
|
||||
|
||||
if ( current_weapon != weapon )
|
||||
{
|
||||
clip_ammo = self getweaponammoclip( weapon );
|
||||
|
||||
if ( !clip_ammo )
|
||||
self setweaponammoclip( weapon, 1 );
|
||||
else
|
||||
{
|
||||
new_ammo_stock = self getweaponammostock( weapon ) + 1;
|
||||
self setweaponammostock( weapon, new_ammo_stock );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new_ammo_stock = self getweaponammostock( weapon ) + 1;
|
||||
self setweaponammostock( weapon, new_ammo_stock );
|
||||
}
|
||||
|
||||
self maps\mp\zombies\_zm_stats::increment_client_stat( "ballistic_knives_pickedup" );
|
||||
self maps\mp\zombies\_zm_stats::increment_player_stat( "ballistic_knives_pickedup" );
|
||||
model destroy_ent();
|
||||
trigger destroy_ent();
|
||||
}
|
Reference in New Issue
Block a user