mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#731 - stop error if target offscreen
This commit is contained in:
parent
b32a2b7495
commit
71e62711c6
@ -40,12 +40,13 @@ if (true) then {
|
||||
|
||||
{
|
||||
_ppos = worldToScreen (_object modelToWorld _x);
|
||||
_pposX = _ppos select 0;
|
||||
_pposY = _ppos select 1;
|
||||
if (_pposX < _minX) then {_minX = _pposX};
|
||||
if (_pposX > _maxX) then {_maxX = _pposX};
|
||||
if (_pposY < _minY) then {_minY = _pposY};
|
||||
if (_pposY > _maxY) then {_maxY = _pposY};
|
||||
if (count _ppos >= 2) then {
|
||||
EXPLODE_2_PVT(_ppos,_pposX,_pposY);
|
||||
if (_pposX < _minX) then {_minX = _pposX};
|
||||
if (_pposX > _maxX) then {_maxX = _pposX};
|
||||
if (_pposY < _minY) then {_minY = _pposY};
|
||||
if (_pposY > _maxY) then {_maxY = _pposY};
|
||||
}; //else - what to do if it is offscreen?
|
||||
} forEach _boundsCorners;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user