Files
DayZ-Epoch/SQF/dayz_code/compile/fn_find_plots.sqf
A Man bb968698e6 Modulr build changes
- Players may no longer build objects outside the plot radius.
- This is calculated using the object's pivot point, not its geometry nor its bounding box.
- Players may move an object any distance or height within the plot boundary/sphere.
- Therefore, DZE_buildMaxMoveDistance and DZE_buildMaxHeightDistance are now obsolete.
- Players may move a small distance outside the plot radius, provided the object remains inside.	Enabled with DZE_PlotOzone.	Default: 10 meters.
- A line of helpers now appears through the plot's vertical axis to aid line-of-sight to the pole.	Enabled with DZE_AxialHelper.
- This may be useful for nearby plots that are grouped together, or where their radii overlap.
- Players may now cancel the build by fast movement, i.e. running, or fast walking on steep terrain.
- This only applies when the player is holding the object. They may press F to release it, then run without cancelling.
- Crouch-walking or slow-walking will not cancel the build.
- The player will auto-crouch when clicking "build" to prevent accidental cancelling.

Changes made by  @Victor-the-Cleaner
2021-09-19 18:41:52 +02:00

29 lines
1.0 KiB
Plaintext

///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Find Plots by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
// Updated by: Victor the Cleaner
// Date: August 2021
//
///////////////////////////////////////////////////////////////////////////////////////////////////
local _player = _this select 0; // object
local _isPole = _this select 1; // bool
local _pos = [vehicle _player] call FNC_getPos;
local _radius = DZE_PlotPole select 0; // plot radius
local _minDistance = DZE_PlotPole select 1; // minimum distance between plot poles
local _nearestPole = objNull; // default
local _distance = _radius; // default
if (_isPole) then {
_distance = _minDistance;
};
// check for near plot
local _findNearestPole = _pos nearEntities ["Plastic_Pole_EP1_DZ", _distance];
local _isNearPlot = count _findNearestPole;
if (_isNearPlot > 0) then { // found one or more
_nearestPole = _findNearestPole select 0; // get first entry
};
[_distance, _isNearPlot, _nearestPole];