diff --git a/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf b/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf index 5ae39825..76951ae3 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf @@ -31,33 +31,25 @@ _config = ('CfgEpochClient' call EPOCH_returnConfig) >> "CfgWorldInteractions"; _selectedConfig = ""; if (_object isEqualType objNull) then { - if !(_object isKindOf "All") then { _modelInfo = getModelInfo _object; - _p3dName = _modelInfo select 0; // replace spaces and periods with underscores - (_p3dName splitString " .") joinString "_"; - _selectedConfig = _p3dName; + _selectedConfig = ((_modelInfo select 0) splitString " .") joinString "_"; } else { _selectedConfig = typeOf _object; }; - } else { // find start of p3d name - OLD UNUSED TBR - _findStart = _object find ": "; - if (_findStart != -1) then{ - _start = _findStart + 2; - _end = (_object find ".") - _start; - _p3dName = _object select[_start, _end]; - // replace spaces with underscores - if (_p3dName find " " != -1) then { - (_p3dName splitString " ") joinString "_"; + if (_object isEqualType "") then { + _findStart = _object find ": "; + if (_findStart != -1) then{ + _start = _findStart + 2; + // replace spaces and periods with underscores + _selectedConfig = ((_object select [_start]) splitString " .") joinString "_"; }; - _selectedConfig = _p3dName + "_p3d"; }; }; - // Do checks _finalConfig = (_config >> _selectedConfig); if (_checkType isEqualType []) then {