This commit is contained in:
Your Name 2020-08-20 16:32:03 -06:00
parent 03d676f0eb
commit 14d92e01bd

View File

@ -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;