mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-09 23:02:53 -05:00
Acidgat: add scripted force weapon switch after last shot
This commit is contained in:
@ -38,7 +38,7 @@ wait_for_blundersplat_fired()
|
|||||||
|
|
||||||
if (str_weapon == "blundersplat_zm")
|
if (str_weapon == "blundersplat_zm")
|
||||||
{
|
{
|
||||||
self setweaponammoclip(str_weapon, 0);
|
self remove_clip_ammo(str_weapon);
|
||||||
|
|
||||||
for (i = 0; i < weaponclipsize(str_weapon); i++)
|
for (i = 0; i < weaponclipsize(str_weapon); i++)
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ wait_for_blundersplat_upgraded_fired()
|
|||||||
|
|
||||||
if (str_weapon == "blundersplat_upgraded_zm")
|
if (str_weapon == "blundersplat_upgraded_zm")
|
||||||
{
|
{
|
||||||
self setweaponammoclip(str_weapon, 0);
|
self remove_clip_ammo(str_weapon);
|
||||||
|
|
||||||
for (i = 0; i < weaponclipsize(str_weapon); i++)
|
for (i = 0; i < weaponclipsize(str_weapon); i++)
|
||||||
{
|
{
|
||||||
@ -70,6 +70,43 @@ wait_for_blundersplat_upgraded_fired()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_clip_ammo(str_weapon)
|
||||||
|
{
|
||||||
|
self setweaponammoclip(str_weapon, 0);
|
||||||
|
|
||||||
|
if (self getammocount(str_weapon) == 0)
|
||||||
|
{
|
||||||
|
self thread force_weapon_switch(str_weapon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
force_weapon_switch(str_weapon)
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
wait weaponfiretime(str_weapon);
|
||||||
|
|
||||||
|
if (self getcurrentweapon() != str_weapon)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
primary_weapons = self getweaponslistprimaries();
|
||||||
|
str_weapon_ind = 0;
|
||||||
|
|
||||||
|
foreach (primary_weapon_ind, primary_weapon in primary_weapons)
|
||||||
|
{
|
||||||
|
if (primary_weapon == str_weapon)
|
||||||
|
{
|
||||||
|
str_weapon_ind = primary_weapon_ind;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_to_weapon_ind = (str_weapon_ind + 1) % primary_weapons.size;
|
||||||
|
self switchtoweapon(primary_weapons[switch_to_weapon_ind]);
|
||||||
|
}
|
||||||
|
|
||||||
_titus_locate_target(is_not_upgraded = 1, count)
|
_titus_locate_target(is_not_upgraded = 1, count)
|
||||||
{
|
{
|
||||||
fire_angles = self getplayerangles();
|
fire_angles = self getplayerangles();
|
||||||
|
Reference in New Issue
Block a user