mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
cleanup dragging
This commit is contained in:
parent
6ac2906aba
commit
6cff8deba8
@ -24,7 +24,7 @@
|
||||
#endif
|
||||
|
||||
params ["_args", "_idPFH"];
|
||||
_args params ["_unit","_target", "_startTime"];
|
||||
_args params ["_unit", "_target", "_startTime"];
|
||||
|
||||
if !(_unit getVariable [QGVAR(isDragging), false]) exitWith {
|
||||
TRACE_2("drag false",_unit,_target);
|
||||
@ -35,7 +35,7 @@ if !(_unit getVariable [QGVAR(isDragging), false]) exitWith {
|
||||
if (!alive _target || {_unit distance _target > 10}) then {
|
||||
TRACE_2("dead/distance",_unit,_target);
|
||||
if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith {
|
||||
//attachTo seems to have some kind of network delay and target can return an odd position durring the first few frames,
|
||||
//attachTo seems to have some kind of network delay and target can return an odd position during the first few frames,
|
||||
//so wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos)
|
||||
TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user