summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-04-13 09:55:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-04-13 09:55:32 +0200
commit2f839459e91b01aa5caba10b5ba9fa70968aceea (patch)
treec5dcd2d8f39e8276b6ff5e212607733b531bfe1c
parentbc21717b176b4eafb3d4c24382a0998c5fef3445 (diff)
logic/tracker: zero at the right pipeline stage
-rw-r--r--logic/tracker.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 95f7b38f..bb207e22 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -294,10 +294,6 @@ void Tracker::logic()
for (int i = 3; i < 6; i++)
value(i) = map(value(i), m(i));
- if (get(f_zero))
- for (int i = 0; i < 6; i++)
- value(i) = 0;
-
const bool reltrans = !get(f_tcomp_disabled);
if (s.tcomp_p && reltrans)
@@ -347,6 +343,10 @@ void Tracker::logic()
(void) map(raw_6dof(i), m(i));
}
+ if (get(f_zero))
+ for (int i = 0; i < 6; i++)
+ value(i) = 0;
+
// custom zero position
for (int i = 0; i < 6; i++)
value(i) += m(i).opts.zero * (m(i).opts.invert ? -1 : 1);