Remove grass behind the trench

This commit is contained in:
SzwedzikPL 2016-03-22 11:26:40 +01:00
parent 203c059cc1
commit 10d20472d3
2 changed files with 11 additions and 0 deletions

View File

@ -61,6 +61,7 @@ class CfgVehicles {
GVAR(removalDuration) = 12;
GVAR(noGeoClass) = "ACE_envelope_small_NoGeo";
GVAR(placementData)[] = {2,3,0.35};
GVAR(grassCuttingPoints)[] = {{0,-0.5,0}};
ACE_TRENCHES_ACTIONS;
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
@ -76,6 +77,7 @@ class CfgVehicles {
GVAR(removalDuration) = 15;
GVAR(noGeoClass) = "ACE_envelope_big_NoGeo";
GVAR(placementData)[] = {6,1.1,0.20};
GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}};
ACE_TRENCHES_ACTIONS;
class EventHandlers {
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};

View File

@ -67,6 +67,15 @@ private _fnc_onFailure = {
if(_actualProgress == 0) then {
[_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp, _actualProgress] call FUNC(setTrenchPlacement);
//Remove grass
{
private _trenchGrassCutter = createVehicle ["Land_ClutterCutter_medium_F", [0, 0, 0], [], 0, "NONE"];
private _cutterPos = AGLToASL (_trench modelToWorld _x);
_cutterPos set [2, getTerrainHeightASL _cutterPos];
_trenchGrassCutter setPosASL _cutterPos;
deleteVehicle _trenchGrassCutter;
} foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints));
};
private _progressLeft = (_actualProgress * 10) + 1;