Final pos for traders

This commit is contained in:
He-Man 2018-09-23 02:25:17 +02:00
parent cb7619831f
commit af8e8b4564
2 changed files with 12 additions and 0 deletions

View File

@ -205,6 +205,12 @@ for "_i" from 0 to (_maxTraderLimit-1) do {
};
_dir = random 360;
_agent call _TraderInit;
if (surfaceiswater _pos) then {
_agent setPosASL _pos;
}
else {
_agent setPosATL _pos;
};
if (_arrchanged) then {
// diag_log format ["EPOCH_DEBUG: TraderSlot: %1 | Saved",_i];
["AI_ITEMS", _objHiveKey, EPOCH_expiresAIdata, _arr] call EPOCH_fnc_server_hiveSETEX;

View File

@ -68,6 +68,12 @@ for "_i" from 1 to _spawnCount do {
};
};
_agent allowdamage !_TraderGodMode;
if (surfaceiswater _pos) then {
_agent setPosASL _pos;
}
else {
_agent setPosATL _pos;
};
_slot = EPOCH_TraderSlots deleteAt 0;
_agent setVariable["AI_SLOT", _slot, true];
_agent setVariable["AI_ITEMS", EPOCH_starterTraderItems, true];