mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
@@ -41,8 +41,12 @@ if (_build) then {
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem; // Added Nutrition-Factor for work
|
||||
|
||||
player playActionNow "Medic";
|
||||
uiSleep 5;
|
||||
|
||||
//wait animation end
|
||||
waitUntil {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 1};
|
||||
waitUntil {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 0};
|
||||
|
||||
_object setPosATL _location;
|
||||
player reveal _object;
|
||||
@@ -56,6 +60,9 @@ if (_build) then {
|
||||
|
||||
_variables set [ count _variables, ["ownerArray", [getPlayerUID player]]];
|
||||
_variables set [ count _variables, ["padlockCombination", _passcode]];
|
||||
|
||||
_object removeAllEventHandlers "HandleDamage";
|
||||
_object addeventhandler ["HandleDamage",{ diag_log (_this); if ((_this select 4) == 'PipeBomb') then { _this call fnc_Obj_FenceHandleDam; } else { false }; } ];
|
||||
};
|
||||
_object setVariable ["characterID",dayz_characterID, true];
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ private ["_classType","_item","_action","_missingTools","_missingItem","_emergin
|
||||
"_roadCollide","_checkBeam2Magnet","_a","_beams","_best","_b","_d","_checkNotBuried","_elevation","_position","_delta","_overElevation",
|
||||
"_maxplanting","_safeDistance","_dir","_angleRef","_tmp","_actionCancel","_sfx","_actionBuild","_byPassChecks","_keepOnSlope","_msg",
|
||||
"_isCollisionBypass","_ok","_missing","_upgradeParts","_ownerID","_posReference"];
|
||||
|
||||
/*
|
||||
Needs a full rewrite to keep up with the demand of everything we plan to add.
|
||||
*/
|
||||
@@ -188,6 +189,16 @@ _checkBuildingCollision =
|
||||
|
||||
local _wall = _object isKindOf "DZ_buildables";
|
||||
|
||||
//Make sure no one can build within 6 meters of someone elses walls. Also block placement from anyone from the model origin.
|
||||
if (_wall && {
|
||||
local _result = false;
|
||||
{
|
||||
if (_x != _object && { _x distance _object < 1.5 || { _x getVariable ["ownerArray", [""]] select 0 != getPlayerUID player } } ) exitWith
|
||||
{ _objColliding = _x; _result = true; };
|
||||
} foreach (nearestObjects [_object, ["DZ_buildables"], 6]);
|
||||
_result
|
||||
}) exitWith {};
|
||||
|
||||
//Load object collision points
|
||||
local _points = [];
|
||||
_points resize _count;
|
||||
@@ -214,8 +225,7 @@ _checkBuildingCollision =
|
||||
breakTo "root";
|
||||
};
|
||||
};
|
||||
}
|
||||
foreach lineIntersectsWith [_points select _p1, _points select _p2, _object, player];
|
||||
} foreach lineIntersectsWith [_points select _p1, _points select _p2, _object, player];
|
||||
};
|
||||
} foreach getArray (configFile >> "CfgVehicles" >> _ghost >> "buildCollisionPaths");
|
||||
};
|
||||
@@ -310,7 +320,7 @@ while {dayz_actionInProgress and Dayz_constructionContext select 4} do {
|
||||
_object setDir _angleRef;
|
||||
_tmp = player modelToWorld [0, _safeDistance,0];
|
||||
|
||||
if (Dayz_constructionContext select 5 or _keepOnSlope) then {
|
||||
if ((Dayz_constructionContext select 5) or (_keepOnSlope)) then {
|
||||
_tmp set [2, 0];
|
||||
_object setVectorUp surfaceNormal _tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user