mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-20 16:45:43 +00:00
FIx crash from var usage
This commit is contained in:
parent
bd0411c50c
commit
190271f3ca
@ -1558,15 +1558,11 @@ getRocketAmmo()
|
||||
if (isDefined(answer))
|
||||
return answer;
|
||||
|
||||
weapons = [];
|
||||
weapons[0] = "minigun_mp";
|
||||
weapons[1] = "rpg_mp";
|
||||
if (self GetAmmoCount("minigun_mp"))
|
||||
return "minigun_mp";
|
||||
|
||||
for (i = 0; i < weapons.size; i++)
|
||||
{
|
||||
if (self GetAmmoCount(weapons[i]))
|
||||
return weapons[i];
|
||||
}
|
||||
if (self GetAmmoCount("rpg_mp"))
|
||||
return "rpg_mp";
|
||||
|
||||
return undefined;
|
||||
}
|
||||
@ -1576,16 +1572,14 @@ getRocketAmmo()
|
||||
*/
|
||||
getLockonAmmo()
|
||||
{
|
||||
weapons = [];
|
||||
weapons[0] = "m72_law_mp";
|
||||
weapons[1] = "strela_mp";
|
||||
weapons[2] = "m202_flash_mp";
|
||||
if (self GetAmmoCount("m72_law_mp"))
|
||||
return "m72_law_mp";
|
||||
|
||||
for (i = 0; i < weapons.size; i++)
|
||||
{
|
||||
if (self GetAmmoCount(weapons[i]))
|
||||
return weapons[i];
|
||||
}
|
||||
if (self GetAmmoCount("strela_mp"))
|
||||
return "strela_mp";
|
||||
|
||||
if (self GetAmmoCount("m202_flash_mp"))
|
||||
return "m202_flash_mp";
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user