mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
limit op
This commit is contained in:
parent
03d676f0eb
commit
14d92e01bd
@ -279,11 +279,21 @@ chooseRandomPerk(perkkind)
|
||||
{
|
||||
perks = getPerks(perkkind);
|
||||
rank = self maps\mp\gametypes\_rank::getRankForXp( self getPlayerData("experience") );
|
||||
allowOp = (getDvarInt("bots_loadout_allow_op") >= 1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
perk = random(perks);
|
||||
|
||||
if (!allowOp)
|
||||
{
|
||||
if (perkkind == "perk4")
|
||||
return "specialty_null";
|
||||
|
||||
if (perk == "specialty_pistoldeath")
|
||||
continue;
|
||||
}
|
||||
|
||||
if (perk == "specialty_null")
|
||||
continue;
|
||||
|
||||
@ -315,11 +325,18 @@ chooseRandomCamo()
|
||||
chooseRandomPrimary()
|
||||
{
|
||||
primaries = getPrimaries();
|
||||
allowOp = (getDvarInt("bots_loadout_allow_op") >= 1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
primary = random(primaries);
|
||||
|
||||
if (!allowOp)
|
||||
{
|
||||
if (primary == "riotshield")
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!self isItemUnlocked(primary))
|
||||
continue;
|
||||
|
||||
@ -333,11 +350,18 @@ chooseRandomSecondary(perk1)
|
||||
return "onemanarmy";
|
||||
|
||||
secondaries = getSecondaries();
|
||||
allowOp = (getDvarInt("bots_loadout_allow_op") >= 1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
secondary = random(secondaries);
|
||||
|
||||
if (!allowOp)
|
||||
{
|
||||
if (secondary == "at4" || secondary == "rpg" || secondary == "m79")
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!self isItemUnlocked(secondary))
|
||||
continue;
|
||||
|
||||
@ -351,6 +375,7 @@ chooseRandomSecondary(perk1)
|
||||
chooseRandomAttachmentComboForGun(gun)
|
||||
{
|
||||
atts = getAttachmentsForGun(gun);
|
||||
allowOp = (getDvarInt("bots_loadout_allow_op") >= 1);
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -360,6 +385,12 @@ chooseRandomAttachmentComboForGun(gun)
|
||||
if (!isValidAttachmentCombo(att1, att2))
|
||||
continue;
|
||||
|
||||
if (!allowOp)
|
||||
{
|
||||
if (att1 == "gl" || att2 == "gl")
|
||||
continue;
|
||||
}
|
||||
|
||||
retAtts = [];
|
||||
retAtts[0] = att1;
|
||||
retAtts[1] = att2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user