diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index cbbd76870..9385fc1bd 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -111,6 +111,7 @@ [FIXED] UH1Y and AH6X unkown animation source RPT errors, and added back observer seats to AH6X and UH1Y without thermal imaging. @icomrade [FIXED] Players can no longer relog over bases in a helicopter, parachute or plane to get inside. @ebaydayz [FIXED] Mozzie helicopter noises, and crashed mozzies bouncing into orbit. @icomrade +[FIXED] Firing from vehicles puts you in combat now. @icomrade [UPDATED] .hpp files updated in dayz_code\Configs\CfgLoot\CfgBuildingPos. @Uro1 [UPDATED] .bat files updated in Config-Examples @Raziel23x diff --git a/SQF/dayz_code/actions/A_Plot_for_Life/object_removePlotRadius.sqf b/SQF/dayz_code/actions/A_Plot_for_Life/object_removePlotRadius.sqf deleted file mode 100644 index 4a0c08a71..000000000 --- a/SQF/dayz_code/actions/A_Plot_for_Life/object_removePlotRadius.sqf +++ /dev/null @@ -1,28 +0,0 @@ -// Remove preview build by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/) -private ["_distance","_plotPole","_findNearestPoles","_validMarkers","_isNearPlot","_poleInv"]; - -_distance = (DZE_PlotPole select 0) + 5; - -// check for near plot -_plotPole = nearestobject [(vehicle player),"Plastic_Pole_EP1_DZ"]; -_findNearestPoles = (position _plotpole) nearEntities ["Land_coneLight", _distance]; -_validMarkers = []; -_isNearPlot = 0; - -{ - _poleInv = _x getVariable ["inventory",[]]; - - if (_poleInv select 0 == "PPMarker") then { - _validMarkers set [count _validMarkers,_x]; - }; -} count _findNearestPoles; - -_IsNearPlot = count _validMarkers; - -// If no plot poles found with ppMarker in the inventory. -if (_IsNearPlot > 0) then{ - { - diag_log format["Object remove plot radius: [Destroying object: %1]",_x]; - deleteVehicle _x; - } count _validMarkers; -}; \ No newline at end of file diff --git a/SQF/dayz_code/actions/A_Plot_for_Life/object_showPlotRadius.sqf b/SQF/dayz_code/actions/A_Plot_for_Life/object_showPlotRadius.sqf deleted file mode 100644 index edceb4589..000000000 --- a/SQF/dayz_code/actions/A_Plot_for_Life/object_showPlotRadius.sqf +++ /dev/null @@ -1,23 +0,0 @@ -// Build preview adopted from Axe Cop (@vos) Base Destruction Script -// Amended by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/) to allow plot radius removal. -private ["_location","_object","_i","_nearPlotPole","_lightArray","_BD_radius","_BD_center","_color"]; - -// global vars -_nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"]; -_lightArray = []; - -//"privatized" center variable -_BD_radius = DZE_PlotPole select 0; -_BD_center = [_nearPlotPole] call FNC_getPos; - -_color = "#(argb,8,8,3)color(0.99,0.65,0.06,1,ca)"; //dark orange - -// circle -for "_i" from 0 to 360 step (450 / _BD_radius) do { - _location = [(_BD_center select 0) + ((cos _i) * _BD_radius), (_BD_center select 1) + ((sin _i) * _BD_radius), (_BD_center select 2) - 0.18]; - - _object = createVehicle ["Land_coneLight", _location, [], 0, "CAN_COLLIDE"]; - _object setVariable ["Inventory", ["PPMarker"],true]; - _object enableSimulation false; - _object setpos _location; -}; diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index a4f0fa20b..96a1fae3b 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -475,10 +475,6 @@ if (_canBuild select 0) then { format[localize "str_build_01",_text] call dayz_rollingMessages; - //if (_canBuild select 1) then { //if item was a plotpole, build a visual radius around it - //[] spawn player_plotPreview; //handled in fn_SelfActions now - //}; - _tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable if(_lockable > 1) then { //if item has code lock on it diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 67baed59e..52bd86834 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -384,10 +384,6 @@ if (_canBuild select 0) then { format[localize "str_build_01",_text] call dayz_rollingMessages; - //if (_canBuild select 1) then { - //[] spawn player_plotPreview; - //}; - _tmpbuilt setVariable ["OEMPos",_location,true]; if(_lockable > 1) then { diff --git a/SQF/dayz_code/actions/plotManagement/plotToggleMarkers.sqf b/SQF/dayz_code/actions/plotManagement/plotToggleMarkers.sqf index fbe7a54ed..bfa3f1ab7 100644 --- a/SQF/dayz_code/actions/plotManagement/plotToggleMarkers.sqf +++ b/SQF/dayz_code/actions/plotManagement/plotToggleMarkers.sqf @@ -1,68 +1,80 @@ //Zero Remorse, big thanks to their scripter for this! private ["_speed","_density","_model","_thePlot","_center","_radius","_angle","_count","_axis","_obj","_idx","_a","_b"]; -_speed = 4; // multiplier for speed of sphere rotation/wobble -_density = 3; // density of markers per ring -_model = "Sign_sphere100cm_EP1"; // marker model to use on rings +_speed = 4; // multiplier for speed of sphere rotation/wobble +_density = 3; // density of markers per ring +_model = "Sign_sphere100cm_EP1"; // marker model to use on rings // Possible ones to use :: Sign_sphere10cm_EP1 Sign_sphere25cm_EP1 Sign_sphere100cm_EP1 _thePlot = (nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15]) select 0; -_center = getPosASL _thePlot; _radius = DZE_PlotPole select 0; -_obj = false; _tmp = -1; +_center = getPosASL _thePlot; +_radius = DZE_PlotPole select 0; +_obj = false; +_tmp = -1; if (!isNil "PP_Marks") then { if (((PP_Marks select 0) distance _thePlot) < 10) then { _obj = true; }; _tmp = (PP_Marks select 0) distance _thePlot; - { deleteVehicle _x; } count PP_Marks; PP_Marks = nil; + { deleteVehicle _x; } count PP_Marks; + PP_Marks = nil; }; if ((isNil "PP_Marks") && (!_obj)) then { - PP_Marks = []; _count = round((2 * pi * _radius) / _density); + PP_Marks = []; + _count = round((2 * pi * _radius) / _density); _obj = "Sign_sphere10cm_EP1" createVehicleLocal [0,0,0]; // PARENT marker on pole _obj setPosASL [_center select 0, _center select 1, _center select 2]; - _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; _axis = _obj; - _obj setVectorUp [0, 0, 0]; PP_Marks set [count PP_Marks, _obj]; + _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; + _axis = _obj; + _obj setVectorUp [0, 0, 0]; + PP_Marks set [count PP_Marks, _obj]; _angle = 0; - for "_idx" from 0 to _count do { + for "_idx" from 0 to _count do { _a = (_center select 0) + (sin(_angle)*_radius); _b = (_center select 1) + (cos(_angle)*_radius); _obj = _model createVehicleLocal [0,0,0]; _obj setPosASL [_a, _b, _center select 2]; _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; - _obj attachTo [_axis]; PP_Marks set [count PP_Marks, _obj]; + _obj attachTo [_axis]; + PP_Marks set [count PP_Marks, _obj]; _a = (_center select 0) + (sin(_angle)*_radius); _b = (_center select 2) + (cos(_angle)*_radius); _obj = _model createVehicleLocal [0,0,0]; _obj setPosASL [_a, _center select 1, _b]; _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; - _obj attachTo [_axis]; PP_Marks set [count PP_Marks, _obj]; + _obj attachTo [_axis]; + PP_Marks set [count PP_Marks, _obj]; _angle = _angle + (360/_count); }; _angle = (360/_count); - for "_idx" from 0 to (_count - 2) do { + for "_idx" from 0 to (_count - 2) do { _a = (_center select 1) + (sin(_angle)*_radius); _b = (_center select 2) + (cos(_angle)*_radius); _obj = _model createVehicleLocal [0,0,0]; _obj setPosASL [_center select 0, _a, _b]; _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; - _obj attachTo [_axis]; PP_Marks set [count PP_Marks, _obj]; + _obj attachTo [_axis]; + PP_Marks set [count PP_Marks, _obj]; _angle = _angle + (360/_count); }; - _angle = (360/_count); _axis setDir 45; - for "_idx" from 0 to (_count - 2) do { + _angle = (360/_count); + _axis setDir 45; + for "_idx" from 0 to (_count - 2) do { _a = (_center select 0) + (sin(_angle)*_radius); _b = (_center select 2) + (cos(_angle)*_radius); _obj = _model createVehicleLocal [0,0,0]; _obj setPosASL [_a, _center select 1, _b]; _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; - _obj attachTo [_axis]; PP_Marks set [count PP_Marks, _obj]; + _obj attachTo [_axis]; + PP_Marks set [count PP_Marks, _obj]; _a = (_center select 1) + (sin(_angle)*_radius); _b = (_center select 2) + (cos(_angle)*_radius); _obj = _model createVehicleLocal [0,0,0]; _obj setPosASL [_center select 0, _a, _b]; _obj setObjectTexture [0, "#(argb,16,16,1)color(0,1,0,0.4)"]; - _obj attachTo [_axis]; PP_Marks set [count PP_Marks, _obj]; + _obj attachTo [_axis]; + PP_Marks set [count PP_Marks, _obj]; _angle = _angle + (360/_count); }; -}; +}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 60779e902..3485324ae 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -679,24 +679,14 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_maintain_area_preview = player addAction [format["%1",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf", "preview", 5, false]; }; }; - _PlotsmarkersNear = count (_cursorTarget nearEntities ["Land_coneLight", DZE_PlotPole select 0]); - if (s_player_plot_boundary_on < 0) then { - if (_PlotsmarkersNear == 0) then{ - s_player_plot_boundary_on = player addAction ["Show plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_showPlotRadius.sqf", "", 1, false]; - }; - }; - if (s_player_plot_boundary_off < 0) then { - if (_PlotsmarkersNear > 0) then{ - s_player_plot_boundary_off = player addAction ["Remove plot boundary", "\z\addons\dayz_code\actions\A_Plot_for_Life\object_removePlotRadius.sqf", "", 1, false]; - }; + if (s_player_plot_boundary < 0) then { + s_player_plot_boundary = player addAction [localize "STR_EPOCH_PLOTMANAGEMENT_SHOW_BOUNDARY", "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf", "", 1, false]; }; - if (DZE_permanentPlot) then { + if (DZE_permanentPlot && DZE_PlotOwnership) then { if (s_player_plot_take_ownership < 0) then { - if (DZE_PlotOwnership) then { - _isOwner = [player, _cursorTarget] call FNC_check_access; - if (_isOwner select 0) then { - s_player_plot_take_ownership = player addAction ["Take plot items ownership", "\z\addons\dayz_code\actions\A_Plot_for_Life\plot_take_ownership.sqf", "", 1, false]; - }; + _isOwner = [player, _cursorTarget] call FNC_check_access; + if (_isOwner select 0) then { + s_player_plot_take_ownership = player addAction [localize "STR_EPOCH_APLOTFORLIFE_TAKE_PLOT_OWNERSHIP", "\z\addons\dayz_code\actions\A_Plot_for_Life\plot_take_ownership.sqf", "", 1, false]; }; }; }; @@ -709,10 +699,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur s_player_maintain_area_force = -1; player removeAction s_player_maintain_area_preview; s_player_maintain_area_preview = -1; - player removeAction s_player_plot_boundary_on; - s_player_plot_boundary_on = -1; - player removeAction s_player_plot_boundary_off; - s_player_plot_boundary_off = -1; + player removeAction s_player_plot_boundary; + s_player_plot_boundary = -1; player removeAction s_player_plot_take_ownership; s_player_plot_take_ownership = -1; }; @@ -1109,10 +1097,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur }; } else { //Engineering - player removeAction s_player_plot_boundary_on; - s_player_plot_boundary_on = -1; - player removeAction s_player_plot_boundary_off; - s_player_plot_boundary_off = -1; + player removeAction s_player_plot_boundary; + s_player_plot_boundary = -1; player removeAction s_player_plot_take_ownership; s_player_plot_take_ownership = -1; player removeAction s_player_plotManagement; diff --git a/SQF/dayz_code/compile/object_showPlotRadius.sqf b/SQF/dayz_code/compile/object_showPlotRadius.sqf deleted file mode 100644 index e47eb477b..000000000 --- a/SQF/dayz_code/compile/object_showPlotRadius.sqf +++ /dev/null @@ -1,19 +0,0 @@ -//Build preview adopted from Axe Cop (@vos) Base Destruction Script - -private ["_location","_object","_objects","_i","_dir","_nearPlotPole"]; - -// global vars -_nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"]; - -//"privatized" center variable -_BD_radius = DZE_PlotPole select 0; -_BD_center = [_nearPlotPole] call FNC_getPos; - - _objects = []; - -// circle -for "_i" from 0 to 360 step (270 / _BD_radius) do { - _location = [(_BD_center select 0) + ((cos _i) * _BD_radius), (_BD_center select 1) + ((sin _i) * _BD_radius), _BD_center select 2]; - _object = createVehicle ["Plastic_Pole_EP1", _location, [], 0, "CAN_COLLIDE"]; - _object setpos _location; -}; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index b35565711..4ca0e9b31 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -179,7 +179,6 @@ if (!isDedicated) then { player_loadCrate = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_loadCrate.sqf"; player_lockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_lockVault.sqf"; player_packVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packVault.sqf"; - player_plotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_showPlotRadius.sqf"; player_removeItems = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_removeItems.sqf"; player_removeNearby = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_removeNearby.sqf"; player_removeObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remove.sqf"; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index f418ff7c0..52aeb0a39 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -243,8 +243,7 @@ dayz_resetSelfActions = { s_player_toggleSnapSelect = -1; s_player_toggleSnapSelectPoint = []; snapActions = -1; - s_player_plot_boundary_on = -1; - s_player_plot_boundary_off = -1; + s_player_plot_boundary = -1; s_player_plot_take_ownership = -1; s_player_plotManagement = -1; s_player_toggleDegree = -1; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 4e14fbc1c..37a73791c 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -15063,6 +15063,9 @@ Some change is hidden in the overflow slots of your gear. + + Take plot items ownership + Take Ownership: %1 objects ownership changed. @@ -15094,6 +15097,9 @@ Можно добавить друзей: %1 Nur %1 Freunde erlaubt + + Show plot boundary + Trader