From 9ac1ca5aa120263a1d19735eef6c9614306e45e0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 5 Sep 2013 00:35:59 +0300 Subject: simplify next draw frame calculation in being. --- src/being/being.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/being/being.cpp b/src/being/being.cpp index 7dfe9d9b6..252de4c3b 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1481,10 +1481,8 @@ void Being::logic() case MOVE: { - if (getWalkSpeed().x && static_cast ((static_cast( - get_elapsed_time(mActionTime)) * static_cast( - frameCount)) / getWalkSpeed().x) - >= frameCount) + if (static_cast(get_elapsed_time(mActionTime) + >= getWalkSpeed().x)) { nextTile(); } @@ -1493,8 +1491,6 @@ void Being::logic() case ATTACK: { -// std::string particleEffect(""); - if (!mActionTime) break; -- cgit v1.2.3-70-g09d2