From 5fea5ba13600f93312b4d746d6aed3ce359872c6 Mon Sep 17 00:00:00 2001 From: He-Man Date: Mon, 4 Sep 2017 19:10:52 +0200 Subject: [PATCH] Fix for undefined var on environment Animals https://github.com/EpochModTeam/Epoch/issues/850 --- .../epoch_code/compile/functions/EPOCH_worldObjectType.sqf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf b/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf index 239fda25..57b5f6cf 100644 --- a/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf +++ b/Sources/epoch_code/compile/functions/EPOCH_worldObjectType.sqf @@ -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; };