From d72af996635fd13a3b331b503ba2071a65e3366b Mon Sep 17 00:00:00 2001 From: vbawol Date: Tue, 3 Oct 2017 16:41:46 -0500 Subject: [PATCH] loot fix test --- Sources/epoch_code/compile/setup/masterLoop/init.sqf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 2a274a97..5a5aed15 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -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 {