diff options
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index f0df72a8..f290747e 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -412,16 +412,20 @@ void Engine::draw() int pf = being->frame + being->action; if (being->action == ATTACK) { - if (being->weapon > 0) - pf += 4 * (being->weapon - 1); + if (being->getWeapon() > 0) + pf += 4 * (being->getWeapon() - 1); } guiGraphics->drawImage(playerset->spriteset[pf + 16 * dir], being->text_x - 16, being->text_y - 32); - if (being->weapon != 0 && being->action == ATTACK) { + //if (being->action == ATTACK) + //{ + // std::cout << being->name << " " << being->getWeapon() << std::endl; + //} + if (being->getWeapon() != 0 && being->action == ATTACK) { Image *image = weaponset->spriteset[ - 16 * (being->weapon - 1) + 4 * being->frame + dir]; + 16 * (being->getWeapon() - 1) + 4 * being->frame + dir]; guiGraphics->drawImage(image, being->text_x - 64, being->text_y - 80); |