mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-22 02:15:42 +00:00
no tube weapons if no op allowed
This commit is contained in:
parent
cae032eb9a
commit
d788ce7cb3
@ -646,6 +646,7 @@ get_random_attachment( weapon, rank )
|
|||||||
return "none";
|
return "none";
|
||||||
|
|
||||||
reasonable = GetDvarInt( "bots_loadout_reasonable" );
|
reasonable = GetDvarInt( "bots_loadout_reasonable" );
|
||||||
|
op = GetDvarInt( "bots_loadout_allow_op" );
|
||||||
|
|
||||||
id = level.tbl_weaponIDs[level.weaponReferenceToIndex[weapon]];
|
id = level.tbl_weaponIDs[level.weaponReferenceToIndex[weapon]];
|
||||||
atts = strtok( id["attachment"], " " );
|
atts = strtok( id["attachment"], " " );
|
||||||
@ -668,6 +669,12 @@ get_random_attachment( weapon, rank )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !op )
|
||||||
|
{
|
||||||
|
if ( att == "gl" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
return att;
|
return att;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -768,6 +775,7 @@ get_random_grenade( perk1 )
|
|||||||
get_random_weapon( groups, rank )
|
get_random_weapon( groups, rank )
|
||||||
{
|
{
|
||||||
reasonable = GetDvarInt( "bots_loadout_reasonable" );
|
reasonable = GetDvarInt( "bots_loadout_reasonable" );
|
||||||
|
op = GetDvarInt( "bots_loadout_allow_op" );
|
||||||
|
|
||||||
keys = getArrayKeys( level.tbl_weaponIDs );
|
keys = getArrayKeys( level.tbl_weaponIDs );
|
||||||
|
|
||||||
@ -809,6 +817,12 @@ get_random_weapon( groups, rank )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !op )
|
||||||
|
{
|
||||||
|
if ( ref == "rpg" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isItemUnlocked( ref, rank ) )
|
if ( !isItemUnlocked( ref, rank ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user