Merge branch 'master' of github.com:it0uchpods/IDG-A32X
This commit is contained in:
commit
92cc62fcfc
2 changed files with 7 additions and 2 deletions
|
@ -42,6 +42,7 @@ var _loop = func() {
|
|||
var time = getprop("/sim/time/elapsed-sec");
|
||||
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
|
||||
var speedup = getprop("/sim/speed-up");
|
||||
var deriv = 0;
|
||||
dt = time - _time;
|
||||
# XXX Sanitising dt. Smaller chance of freakout on lag spike.
|
||||
if(dt > 0.0) {
|
||||
|
|
|
@ -26,9 +26,13 @@ var _D_min = nil;
|
|||
var _add = func(pos) {
|
||||
if (_N) {
|
||||
var (A, S) = courseAndDistance(_user_points.arr[_N - 1], pos);
|
||||
if (S * NM2M < 3 * _D_min) {
|
||||
S *= NM2M;
|
||||
if (S < 3 * _D_min) {
|
||||
gui.popupTip("Too close to the previous point,\ntry again");
|
||||
return;
|
||||
}else if (S > 10000.0) {
|
||||
gui.popupTip("Too far from the previous point,\ntry again");
|
||||
return;
|
||||
}
|
||||
}
|
||||
_user_points.add(geo.Coord.new(pos));
|
||||
|
|
Reference in a new issue