loot fix test

This commit is contained in:
vbawol 2017-10-03 16:41:46 -05:00
parent 3345cc28b4
commit d72af99663

View File

@ -205,7 +205,16 @@ _lootBubble = {
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
_lootDist = 30 + _distanceTraveled;
_lootLoc = player getRelPos [_lootDist, (random [-180,0,180])];
_objects = (_lootLoc nearObjects 30) select {((toLower (typeof _x)) in _lootClasses)};
_objects = (_lootLoc nearObjects 30) select {
_selectedConfig = typeOf _x;
if (_selectedConfig isEqualTo "") then {
(getModelInfo _x) params [["_modelName",""]];
if (!isnil "_modelName") then {
_selectedConfig = (_modelName splitString " .") joinString "_";
};
};
((toLower _selectedConfig) in _lootClasses)
};
diag_log format["DEBUG: loot objects %1",_objects];
_jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH","ProtectionZone_Invisible_F"], _buildingJammerRange];
if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then {