Don't allow placing is standig above the terrain level

This commit is contained in:
esteldunedain 2016-01-23 22:05:29 -03:00
parent 4970423cd7
commit 0fd6981809

View File

@ -22,6 +22,9 @@ params ["_unit","_trenchTypeName"];
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"];
_surfaceClass = (surfaceType getPosASL _unit) select [1];