diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-05 00:35:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-05 01:25:36 +0300 |
commit | 9ac1ca5aa120263a1d19735eef6c9614306e45e0 (patch) | |
tree | aba5691b052ad938ddd6166faab72c12c6d2439f /src | |
parent | 0eafefa3d40cf730749cd7fdfb94f73313e1a159 (diff) | |
download | mv-9ac1ca5aa120263a1d19735eef6c9614306e45e0.tar.gz mv-9ac1ca5aa120263a1d19735eef6c9614306e45e0.tar.bz2 mv-9ac1ca5aa120263a1d19735eef6c9614306e45e0.tar.xz mv-9ac1ca5aa120263a1d19735eef6c9614306e45e0.zip |
simplify next draw frame calculation in being.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 8 |
1 files 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<int> ((static_cast<float>( - get_elapsed_time(mActionTime)) * static_cast<float>( - frameCount)) / getWalkSpeed().x) - >= frameCount) + if (static_cast<float>(get_elapsed_time(mActionTime) + >= getWalkSpeed().x)) { nextTile(); } @@ -1493,8 +1491,6 @@ void Being::logic() case ATTACK: { -// std::string particleEffect(""); - if (!mActionTime) break; |