Fix for undefined var on environment Animals

https://github.com/EpochModTeam/Epoch/issues/850
This commit is contained in:
He-Man 2017-09-04 19:10:52 +02:00 committed by GitHub
parent ac92ca4415
commit 5fea5ba136

View File

@ -33,8 +33,10 @@ _selectedConfig = "";
if (_object isEqualType objNull && !(isNull _object)) then {
if !(_object isKindOf "All") then {
(getModelInfo _object) params [["_modelName",""]];
// replace spaces and periods with underscores
_selectedConfig = (_modelName splitString " .") joinString "_";
if (!isnil "_modelName") then {
// replace spaces and periods with underscores
_selectedConfig = (_modelName splitString " .") joinString "_";
};
} else {
_selectedConfig = typeOf _object;
};