mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Fixed flip storages above Water
This commit is contained in:
parent
3be5012cda
commit
b95b845b9a
@ -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];
|
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 {
|
} else {
|
||||||
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
|
_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 ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
|
||||||
if ((_pos1 distance _pos2) > 0) then {
|
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 {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user