mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cancel placing if position is no longer suitable
This commit is contained in:
parent
8ff8204905
commit
4970423cd7
@ -39,10 +39,17 @@ GVAR(digDirection) = 0;
|
||||
GVAR(digPFH) = [{
|
||||
(_this select 0) params ["_unit", "_trench"];
|
||||
|
||||
// Cancel if the helper object is gone
|
||||
if (isNull _trench) exitWith {
|
||||
[_unit] call FUNC(digCancel);
|
||||
};
|
||||
|
||||
// Cancel if the place is no longer suitable
|
||||
if !([_unit, GVAR(trenchType)] call FUNC(canDigTrench)) exitWith {
|
||||
[_unit] call FUNC(digCancel);
|
||||
};
|
||||
|
||||
// Update trench position
|
||||
private _basePos = eyePos _unit vectorAdd (positionCameraToWorld [0, 0, 2] vectorDiff positionCameraToWorld [0, 0, 0]);
|
||||
private _angle = (GVAR(digDirection) + getDir _unit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user