summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorCedric Borgese <cedric.borgese@gmail.com>2005-07-22 17:27:59 +0000
committerCedric Borgese <cedric.borgese@gmail.com>2005-07-22 17:27:59 +0000
commit5731ddbf5ef5fa1556a7c5f84c0c71865a15499b (patch)
tree967cfacdf62a8930be9691152746b6f0e6b35a6e /src/engine.cpp
parent4333effa0e80c996c91e4014cf449c30a32120b7 (diff)
downloadmana-5731ddbf5ef5fa1556a7c5f84c0c71865a15499b.tar.gz
mana-5731ddbf5ef5fa1556a7c5f84c0c71865a15499b.tar.bz2
mana-5731ddbf5ef5fa1556a7c5f84c0c71865a15499b.tar.xz
mana-5731ddbf5ef5fa1556a7c5f84c0c71865a15499b.zip
Merge between moi1392's branch and head
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp12
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);