mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-07-07 20:38:09 -05:00
Wallbuys: purchasing ammo refills clip ammo
Wallbuys: ammo can be purchased if only alt weapon ammo has been used
This commit is contained in:
@ -212,8 +212,10 @@
|
|||||||
* Max ammo no longer fills clip ammo
|
* Max ammo no longer fills clip ammo
|
||||||
|
|
||||||
## Wallbuys
|
## Wallbuys
|
||||||
|
* Purchasing ammo refills clip ammo
|
||||||
* Increased trigger radius
|
* Increased trigger radius
|
||||||
* Decreased upgraded ammo cost from 4500 to 2500
|
* Decreased upgraded ammo cost from 4500 to 2500
|
||||||
|
* Ammo can be purchased if only alt weapon ammo has been used
|
||||||
* Lethal grenade hint string no longer displays "ammo" after purchasing
|
* Lethal grenade hint string no longer displays "ammo" after purchasing
|
||||||
|
|
||||||
## Mystery Box
|
## Mystery Box
|
||||||
|
@ -171,15 +171,25 @@ ammo_give( weapon )
|
|||||||
|
|
||||||
if ( isdefined( weapon ) )
|
if ( isdefined( weapon ) )
|
||||||
{
|
{
|
||||||
stockmax = 0;
|
|
||||||
stockmax = weaponstartammo( weapon );
|
stockmax = weaponstartammo( weapon );
|
||||||
clipcount = self getweaponammoclip( weapon );
|
clipmax = weaponclipsize( weapon );
|
||||||
currstock = self getammocount( weapon );
|
ammocount = self getammocount( weapon );
|
||||||
|
|
||||||
if ( currstock - clipcount >= stockmax )
|
give_ammo = ammocount < (stockmax + clipmax);
|
||||||
give_ammo = 0;
|
|
||||||
else
|
if (!give_ammo)
|
||||||
give_ammo = 1;
|
{
|
||||||
|
alt_weap = weaponaltweaponname( weapon );
|
||||||
|
|
||||||
|
if ( "none" != alt_weap )
|
||||||
|
{
|
||||||
|
stockmax = weaponstartammo( alt_weap );
|
||||||
|
clipmax = weaponclipsize( alt_weap );
|
||||||
|
ammocount = self getammocount( alt_weap );
|
||||||
|
|
||||||
|
give_ammo = ammocount < (stockmax + clipmax);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( self has_weapon_or_upgrade( weapon ) )
|
else if ( self has_weapon_or_upgrade( weapon ) )
|
||||||
@ -192,10 +202,14 @@ ammo_give( weapon )
|
|||||||
{
|
{
|
||||||
self play_sound_on_ent( "purchase" );
|
self play_sound_on_ent( "purchase" );
|
||||||
self givemaxammo( weapon );
|
self givemaxammo( weapon );
|
||||||
|
self setWeaponAmmoClip( weapon, weaponClipSize(weapon) );
|
||||||
alt_weap = weaponaltweaponname( weapon );
|
alt_weap = weaponaltweaponname( weapon );
|
||||||
|
|
||||||
if ( "none" != alt_weap )
|
if ( "none" != alt_weap )
|
||||||
|
{
|
||||||
self givemaxammo( alt_weap );
|
self givemaxammo( alt_weap );
|
||||||
|
self setWeaponAmmoClip( alt_weap, weaponClipSize(alt_weap) );
|
||||||
|
}
|
||||||
|
|
||||||
self scripts\zm\_zm_reimagined::change_weapon_ammo(weapon);
|
self scripts\zm\_zm_reimagined::change_weapon_ammo(weapon);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user