mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
Speed improvements
This commit is contained in:
parent
a11636b6bd
commit
371fe792b9
@ -22,20 +22,17 @@ if (count _pos isEqualTo 3) then
|
||||
_rad = param [1, -1, [0]];
|
||||
if (_rad > -1) then
|
||||
{ // Check all player distances from _loc
|
||||
if (count allPlayers > 0) then
|
||||
{
|
||||
if (isPlayer _x) then
|
||||
{
|
||||
if (isPlayer _x) then
|
||||
if (speed _x < 250) then // Ignore fast moving players
|
||||
{
|
||||
if (speed _x < 250) then // Ignore fast moving players
|
||||
{
|
||||
private ["_isClose"];
|
||||
_isClose = if ((position _x distance _pos) < _rad) then { true } else { false };
|
||||
if _isClose then { _found = true };
|
||||
};
|
||||
private ["_isClose"];
|
||||
_isClose = if ((position _x distance _pos) < _rad) then { true } else { false };
|
||||
if _isClose then { _found = true };
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
};
|
||||
} forEach allPlayers;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -40,12 +40,9 @@ if (_this isEqualType []) then
|
||||
_indexes pushBack _forEachIndex;
|
||||
};
|
||||
} forEach _scopes;
|
||||
if (count _indexes > 0) then
|
||||
{
|
||||
{
|
||||
_scopes deleteAt _x;
|
||||
} forEach _indexes;
|
||||
};
|
||||
_scopes deleteAt _x;
|
||||
} forEach _indexes;
|
||||
};
|
||||
_unit addPrimaryWeaponItem (selectRandom _scopes);
|
||||
};
|
||||
|
@ -19,19 +19,16 @@ if (_this isEqualType []) then
|
||||
_minimum = param [0, -1, [0]];
|
||||
if (_minimum > -1) then
|
||||
{
|
||||
if (count allPlayers >= _minimum) then
|
||||
_players = 0;
|
||||
{
|
||||
_players = 0;
|
||||
if (isPlayer _x) then
|
||||
{
|
||||
if (isPlayer _x) then
|
||||
{
|
||||
_players = _players + 1;
|
||||
};
|
||||
} forEach allPlayers;
|
||||
if not(_players isEqualTo 0) then
|
||||
{
|
||||
_ok = true
|
||||
_players = _players + 1;
|
||||
};
|
||||
} forEach allPlayers;
|
||||
if (_players > 0) then
|
||||
{
|
||||
_ok = true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -13,15 +13,12 @@
|
||||
|
||||
if (([["aiStatic"],["enabled"]] call VEMFr_fnc_getSetting) select 0 isEqualTo 1) then
|
||||
{
|
||||
["spawnStaticAI", 2, "launching..."] spawn VEMFr_fnc_log;
|
||||
_settings = [["aiStatic"],["positions","amount"]] call VEMFr_fnc_getSetting;
|
||||
_positions = _settings select 0;
|
||||
if (count _positions > 0) then
|
||||
{
|
||||
["spawnStaticAI", 2, "spawning AI on positions..."] spawn VEMFr_fnc_log;
|
||||
_amounts = _settings select 1;
|
||||
{
|
||||
[_x, 2, _amounts select _foreachindex, "aiMode" call VEMFr_fnc_getSetting, "Static"] spawn VEMFr_fnc_spawnVEMFrAI;
|
||||
} forEach _positions;
|
||||
};
|
||||
["spawnStaticAI", 2, "launching..."] spawn VEMFr_fnc_log;
|
||||
_settings = [["aiStatic"],["positions","amount"]] call VEMFr_fnc_getSetting;
|
||||
_positions = _settings select 0;
|
||||
["spawnStaticAI", 2, "spawning AI on positions..."] spawn VEMFr_fnc_log;
|
||||
_amounts = _settings select 1;
|
||||
{
|
||||
[_x, 2, _amounts select _foreachindex, "aiMode" call VEMFr_fnc_getSetting, "Static"] spawn VEMFr_fnc_spawnVEMFrAI;
|
||||
} forEach _positions;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user