mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Interaction - Fix div0 error in getVehiclePos (#6139)
* Interaction - Fix div0 error in getVehiclePos * Formating
This commit is contained in:
parent
c864a6d569
commit
1c6c7914dc
@ -26,9 +26,10 @@ private _relPos = _target worldToModelVisual ASLToAGL _cameraPosASL;
|
||||
#endif
|
||||
_relPos params ["_dx", "_dy", "_dz"];
|
||||
|
||||
private _ndx = (abs _dx) / ((abs (_bbx)) - 1);
|
||||
private _ndy = (abs _dy) / ((abs (_bbY)) - 1);
|
||||
private _ndz = (abs _dz) / ((abs (_bbZ)) - 1);
|
||||
private _ndx = (abs _dx) / (((abs (_bbX)) - 1) max 1);
|
||||
private _ndy = (abs _dy) / (((abs (_bbY)) - 1) max 1);
|
||||
private _ndz = (abs _dz) / (((abs (_bbZ)) - 1) max 1);
|
||||
|
||||
|
||||
private _pos = [];
|
||||
if (_ndx > _ndy) then {
|
||||
|
@ -29,9 +29,9 @@ if (isNumber (_config >> QGVAR(bodyLength))) then {_bbY = getNumber (_config >>
|
||||
private _relPos = _target worldToModelVisual ASLToAGL _cameraPosASL;
|
||||
_relPos params ["_dx", "_dy", "_dz"];
|
||||
|
||||
private _ndx = (abs _dx) / ((abs (_bbx)) - 1);
|
||||
private _ndy = (abs _dy) / ((abs (_bbY)) - 1);
|
||||
private _ndz = (abs _dz) / ((abs (_bbZ)) - 1);
|
||||
private _ndx = (abs _dx) / (((abs (_bbX)) - 1) max 1);
|
||||
private _ndy = (abs _dy) / (((abs (_bbY)) - 1) max 1);
|
||||
private _ndz = (abs _dz) / (((abs (_bbZ)) - 1) max 1);
|
||||
|
||||
|
||||
private _pos = [];
|
||||
|
Loading…
Reference in New Issue
Block a user