1
0
Fork 0

: fix fly-by-view when aircraft skips position

Reposition when view position is too far away, i.e. due to replay,
relocation etc.
This commit is contained in:
ThorstenB 2012-05-03 00:00:32 +02:00
parent f26472f614
commit 5057b49ed9

View file

@ -292,6 +292,8 @@ var fly_by_view_handler = {
} else {
# use actual distance
dist = me.last.distance_to(pos);
# reset when too far (i.e. position changed due to skipping time in replay mode)
if (dist>5000) return me.reset();
}
# check if the aircraft has moved enough