mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Don't allow placing is standig above the terrain level
This commit is contained in:
parent
4970423cd7
commit
0fd6981809
@ -22,6 +22,9 @@ params ["_unit","_trenchTypeName"];
|
|||||||
|
|
||||||
if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
|
if !("ACE_EntrenchingTool" in items _unit) exitWith {false};
|
||||||
|
|
||||||
|
// Can't dig trench if above ground level
|
||||||
|
if ((getPosATL _unit) select 2 > 0.05) exitWith {false};
|
||||||
|
|
||||||
private ["_surfaceClass", "_surfaceType"];
|
private ["_surfaceClass", "_surfaceType"];
|
||||||
|
|
||||||
_surfaceClass = (surfaceType getPosASL _unit) select [1];
|
_surfaceClass = (surfaceType getPosASL _unit) select [1];
|
||||||
|
Loading…
Reference in New Issue
Block a user