walk back?

This commit is contained in:
Henrique 2011-08-28 23:45:52 -03:00
parent 6206eeb562
commit fe9591ca8d
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ void Creature::draw(int x, int y)
if(m_walking && attributes.animcount > 1) { if(m_walking && attributes.animcount > 1) {
if(g_platform.getTicks() - m_lastTicks >= m_walkTimePerPixel) { if(g_platform.getTicks() - m_lastTicks >= m_walkTimePerPixel) {
int pixelsWalked = (g_platform.getTicks() - m_lastTicks) / m_walkTimePerPixel; int pixelsWalked = std::floor((g_platform.getTicks() - m_lastTicks) / m_walkTimePerPixel);
int remainingTime = (g_platform.getTicks() - m_lastTicks) % (int)m_walkTimePerPixel; int remainingTime = (g_platform.getTicks() - m_lastTicks) % (int)m_walkTimePerPixel;
if(m_direction == Otc::North) if(m_direction == Otc::North)