summaryrefslogtreecommitdiff
path: root/src/train.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train.cpp')
-rw-r--r--src/train.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/train.cpp b/src/train.cpp
index 7ce1c2d..d3ea7fb 100644
--- a/src/train.cpp
+++ b/src/train.cpp
@@ -14,6 +14,7 @@ void Train::update()
return;
}
+ m_speed *= m_acceleration;
if (m_progress < 1.f) {
m_progress += m_speed;
return;
@@ -48,8 +49,8 @@ void Train::setPosition(int tx, int ty)
{
x = tx;
y = ty;
-
m_progress = 0.f;
+
findDirection();
findNextTile();
}