mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
fixes to worldObjectType function
This commit is contained in:
parent
c887028d9b
commit
784bb3d7f3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user