no tube weapons if no op allowed

This commit is contained in:
ineedbots 2021-08-06 19:13:43 -06:00
parent cae032eb9a
commit d788ce7cb3

View File

@ -646,6 +646,7 @@ get_random_attachment( weapon, rank )
return "none";
reasonable = GetDvarInt( "bots_loadout_reasonable" );
op = GetDvarInt( "bots_loadout_allow_op" );
id = level.tbl_weaponIDs[level.weaponReferenceToIndex[weapon]];
atts = strtok( id["attachment"], " " );
@ -668,6 +669,12 @@ get_random_attachment( weapon, rank )
}
}
if ( !op )
{
if ( att == "gl" )
continue;
}
return att;
}
}
@ -768,6 +775,7 @@ get_random_grenade( perk1 )
get_random_weapon( groups, rank )
{
reasonable = GetDvarInt( "bots_loadout_reasonable" );
op = GetDvarInt( "bots_loadout_allow_op" );
keys = getArrayKeys( level.tbl_weaponIDs );
@ -809,6 +817,12 @@ get_random_weapon( groups, rank )
}
}
if ( !op )
{
if ( ref == "rpg" )
continue;
}
if ( !isItemUnlocked( ref, rank ) )
continue;