mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2025-10-30 04:46:56 +00:00
turret
This commit is contained in:
@@ -2773,3 +2773,45 @@ Log( x )
|
||||
answer = 2.0 * sum;
|
||||
return answer;
|
||||
}
|
||||
|
||||
/*
|
||||
CoD2
|
||||
*/
|
||||
array_thread ( ents, process, var, excluders )
|
||||
{
|
||||
exclude = [];
|
||||
|
||||
for ( i = 0; i < ents.size; i++ )
|
||||
{
|
||||
exclude[ i ] = false;
|
||||
}
|
||||
|
||||
if ( isdefined ( excluders ) )
|
||||
{
|
||||
for ( i = 0; i < ents.size; i++ )
|
||||
{
|
||||
for ( p = 0; p < excluders.size; p++ )
|
||||
{
|
||||
if ( ents[ i ] == excluders[p] )
|
||||
{
|
||||
exclude[ i ] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0; i < ents.size; i++ )
|
||||
{
|
||||
if ( !exclude[ i ] )
|
||||
{
|
||||
if ( isdefined ( var ) )
|
||||
{
|
||||
ents[ i ] thread [[ process ]]( var );
|
||||
}
|
||||
else
|
||||
{
|
||||
ents[ i ] thread [[ process ]]();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user