From e3ffa8edf844e73fb05e468c1acfb7d31c66678d Mon Sep 17 00:00:00 2001 From: vbawol Date: Tue, 23 Apr 2013 22:51:57 -0500 Subject: [PATCH] fixes was missing nearestObjects --- dayz_code/actions/fill_startGenerator.sqf | 2 +- dayz_code/actions/player_build.sqf | 4 ++-- dayz_code/actions/remove.sqf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dayz_code/actions/fill_startGenerator.sqf b/dayz_code/actions/fill_startGenerator.sqf index 3ceb68e96..941826a1f 100644 --- a/dayz_code/actions/fill_startGenerator.sqf +++ b/dayz_code/actions/fill_startGenerator.sqf @@ -58,7 +58,7 @@ if (_finished) then { //_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; - _soundSource = createSoundSource ["Generator1", position player, [], 0] + _soundSource = createSoundSource ["Generator1", position player, [], 0]; // TODO: Add running sounds to generator cutText ["Generator has been started.", "PLAIN DOWN"]; diff --git a/dayz_code/actions/player_build.sqf b/dayz_code/actions/player_build.sqf index afed687e5..ae6a0b0b6 100644 --- a/dayz_code/actions/player_build.sqf +++ b/dayz_code/actions/player_build.sqf @@ -23,7 +23,7 @@ _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); // check for near plot -_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30]; +_findNearestPole = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30]; _IsNearPlot = count (_findNearestPole); @@ -31,7 +31,7 @@ if(_IsNearPlot == 0) then { // Allow building of plot if(_classname == "Plastic_Pole_EP1_DZ") then { - if(count ([player, ["Plastic_Pole_EP1_DZ"], 60]) == 0) then { + if(count (nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 60]) == 0) then { _canBuildOnPlot = true; }; }; diff --git a/dayz_code/actions/remove.sqf b/dayz_code/actions/remove.sqf index 687de2009..b385df5a7 100644 --- a/dayz_code/actions/remove.sqf +++ b/dayz_code/actions/remove.sqf @@ -16,7 +16,7 @@ if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) th _limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount"); }; -_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30]; +_findNearestPole = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30]; _IsNearPlot = count (_findNearestPole); if(_IsNearPlot >= 1) then {