Fixed flip storages above Water

This commit is contained in:
He-Man 2017-07-09 20:57:08 +02:00 committed by GitHub
parent 3be5012cda
commit b95b845b9a

View File

@ -24,9 +24,20 @@ if (EPOCH_velTransform) then {
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
} else {
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
_CfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig;
_maxBuildingHeight = getNumber(_CfgEpochClient >> "maxBuildingHeight");
if !(_maxBuildingHeight == 0) then {
if (_pos2 select 2 > _maxBuildingHeight) then {
_pos2 set[2, _maxBuildingHeight];
};
};
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
if ((_pos1 distance _pos2) > 0) then {
EPOCH_target setvelocitytransformation[_pos1, AGLtoASL _pos2, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
_newpos = AGLtoASL _pos2;
if (surfaceiswater _pos2) then {
_newpos = _pos2;
};
EPOCH_target setvelocitytransformation[_pos1, _newpos, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
};
};
} else {