diff options
Diffstat (limited to 'examples/statemachine/errorstate')
-rw-r--r-- | examples/statemachine/errorstate/tankitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/statemachine/errorstate/tankitem.cpp b/examples/statemachine/errorstate/tankitem.cpp index 1e02171..fc71ef9 100644 --- a/examples/statemachine/errorstate/tankitem.cpp +++ b/examples/statemachine/errorstate/tankitem.cpp @@ -41,7 +41,7 @@ public: m_distance -= dist; if (m_reverse && m_distance > 0.0) return false; - else if (m_distance < 0.0) + else if (!m_reverse && m_distance < 0.0) return false; qreal a = item()->direction() * M_PI / 180.0; @@ -73,7 +73,7 @@ public: m_distance -= dist; if (m_reverse && m_distance > 0.0) return false; - else if (m_distance < 0.0) + else if (!m_reverse && m_distance < 0.0) return false; item()->setDirection(item()->direction() + dist); |