1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-21 20:50:42 -05:00
Files
BO2-Reimagined/scripts/zm/replaced/_zm_weap_staff_revive.gsc
Jbleezy c291ffd3a4 Staffs upgraded: decrease alt weapon reload time
Staffs upgraded: fix staff charge not giving max ammo on alt weapon initially
Staffs upgraded: fix staff recharge not recharging alt weapon
2023-04-03 22:26:59 -07:00

47 lines
1.2 KiB
Plaintext

#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_net;
#include maps\mp\zm_tomb_utility;
#include maps\mp\zombies\_zm_laststand;
#include maps\mp\zombies\_zm_weap_staff_revive;
watch_staff_revive_fired()
{
self endon( "disconnect" );
while ( true )
{
self waittill( "missile_fire", e_projectile, str_weapon );
if ( !( str_weapon == "staff_revive_zm" ) )
continue;
self thread staff_revive_impact_wait();
self thread staff_revive_reload( str_weapon );
}
}
staff_revive_impact_wait()
{
self waittill( "projectile_impact", e_ent, v_explode_point, n_radius, str_name, n_impact );
self thread staff_revive_impact( v_explode_point );
}
staff_revive_reload( str_weapon )
{
self endon( "disconnect" );
wait weaponFireTime(str_weapon) - 0.05;
ammo_clip = self getWeaponAmmoClip(str_weapon);
ammo_stock = self getWeaponAmmoStock(str_weapon);
if (ammo_clip < 1 && ammo_stock >= 1)
{
self setWeaponAmmoClip(str_weapon, ammo_clip + 1);
self setWeaponAmmoStock(str_weapon, ammo_stock - 1);
}
}