Skip to content

Commit

Permalink
Update creature.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Jan 30, 2025
1 parent 0276a5f commit c0b44c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ void Creature::nextWalkUpdate()

void Creature::updateWalk(const bool isPreWalking)

Check warning on line 656 in src/client/creature.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04-linux-debug

unused parameter ‘isPreWalking’ [-Wunused-parameter]

Check warning on line 656 in src/client/creature.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-24.04-linux-debug

unused parameter ‘isPreWalking’ [-Wunused-parameter]
{
const float walkTicksPerPixel = (getStepDuration(true) + 8.f) / static_cast<float>(g_gameConfig.getSpriteSize());
const float walkTicksPerPixel = getStepDuration(true) / static_cast<float>(g_gameConfig.getSpriteSize());

const int totalPixelsWalked = std::min<int>(m_walkTimer.ticksElapsed() / walkTicksPerPixel, g_gameConfig.getSpriteSize());

Expand All @@ -672,7 +672,7 @@ void Creature::updateWalk(const bool isPreWalking)
g_map.notificateCameraMove(m_walkOffset);
}

if (m_walkedPixels == g_gameConfig.getSpriteSize() && !isPreWalking) {
if (m_walkedPixels == g_gameConfig.getSpriteSize()) {
terminateWalk();
}
}
Expand Down Expand Up @@ -1192,4 +1192,4 @@ std::string Creature::getText()
bool Creature::canShoot(int distance)
{
return getTile() ? getTile()->canShoot(distance) : false;
}
}

0 comments on commit c0b44c5

Please sign in to comment.