From b03afef460eded933b927f70673df0ac92bf585e Mon Sep 17 00:00:00 2001 From: icomrade Date: Sat, 23 Jul 2016 19:55:24 -0400 Subject: [PATCH] A little neater --- SQF/dayz_code/actions/modular_build.sqf | 5 +++-- SQF/dayz_code/actions/player_build.sqf | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 0b9e5b782..d4347c5e1 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -532,8 +532,9 @@ if (_canBuild select 0) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; if (_lockable == 3) then { - _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], [[([player] call FNC_GetPlayerUID),(name player)]]]; + _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _tmpbuilt setVariable ["doorfriends", _friendsArr, true]; + PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]]; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 1ed661bba..30f98df9c 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -440,8 +440,9 @@ if (_canBuild select 0) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname]; if (_lockable == 3) then { - _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], [[([player] call FNC_GetPlayerUID),(name player)]]]; + _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _tmpbuilt setVariable ["doorfriends", _friendsArr, true]; + PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];