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 = "";
|
_selectedConfig = "";
|
||||||
if (_object isEqualType objNull) then {
|
if (_object isEqualType objNull) then {
|
||||||
|
|
||||||
if !(_object isKindOf "All") then {
|
if !(_object isKindOf "All") then {
|
||||||
_modelInfo = getModelInfo _object;
|
_modelInfo = getModelInfo _object;
|
||||||
_p3dName = _modelInfo select 0;
|
|
||||||
// replace spaces and periods with underscores
|
// replace spaces and periods with underscores
|
||||||
(_p3dName splitString " .") joinString "_";
|
_selectedConfig = ((_modelInfo select 0) splitString " .") joinString "_";
|
||||||
_selectedConfig = _p3dName;
|
|
||||||
} else {
|
} else {
|
||||||
_selectedConfig = typeOf _object;
|
_selectedConfig = typeOf _object;
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// find start of p3d name - OLD UNUSED TBR
|
// find start of p3d name - OLD UNUSED TBR
|
||||||
|
if (_object isEqualType "") then {
|
||||||
_findStart = _object find ": ";
|
_findStart = _object find ": ";
|
||||||
if (_findStart != -1) then{
|
if (_findStart != -1) then{
|
||||||
_start = _findStart + 2;
|
_start = _findStart + 2;
|
||||||
_end = (_object find ".") - _start;
|
// replace spaces and periods with underscores
|
||||||
_p3dName = _object select[_start, _end];
|
_selectedConfig = ((_object select [_start]) splitString " .") joinString "_";
|
||||||
// replace spaces with underscores
|
|
||||||
if (_p3dName find " " != -1) then {
|
|
||||||
(_p3dName splitString " ") joinString "_";
|
|
||||||
};
|
};
|
||||||
_selectedConfig = _p3dName + "_p3d";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Do checks
|
// Do checks
|
||||||
_finalConfig = (_config >> _selectedConfig);
|
_finalConfig = (_config >> _selectedConfig);
|
||||||
if (_checkType isEqualType []) then {
|
if (_checkType isEqualType []) then {
|
||||||
|
Loading…
Reference in New Issue
Block a user