summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-22 18:58:47 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-06-22 18:58:47 +0200
commit852ff45c35c422b5264487669934b392a8657465 (patch)
tree380751fae34a7dcd7b31bd84e303b9086eb17485 /src/being.cpp
parent2a11c6c5d874d661dcb7f016183c3c3e64e65f3c (diff)
parentec3c689c64922baf4a9f99bc6e9345e0a80403e8 (diff)
downloadmana-852ff45c35c422b5264487669934b392a8657465.tar.gz
mana-852ff45c35c422b5264487669934b392a8657465.tar.bz2
mana-852ff45c35c422b5264487669934b392a8657465.tar.xz
mana-852ff45c35c422b5264487669934b392a8657465.zip
Merge branch 'master' of gitorious.org:~bertram/mana/mana-any-square-tile-size
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index d9180bc9..42043313 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -27,6 +27,7 @@
#include "configuration.h"
#include "effectmanager.h"
#include "event.h"
+#include "game.h"
#include "graphics.h"
#include "guild.h"
#include "localplayer.h"
@@ -67,8 +68,6 @@
#define HAIR_FILE "hair.xml"
-static const int DEFAULT_BEING_WIDTH = 32;
-static const int DEFAULT_BEING_HEIGHT = 32;
int Being::mNumberOfHairstyles = 1;
Being::Being(int id, Type type, int subtype, Map *map):
@@ -197,8 +196,8 @@ void Being::setDestination(int dstX, int dstY)
return;
// If the destination is unwalkable, don't bother trying to get there
- int tileWidth = mMap->getTileWidth();
- int tileHeight = mMap->getTileHeight();
+ const int tileWidth = mMap->getTileWidth();
+ const int tileHeight = mMap->getTileHeight();
if (!mMap->getWalk(dstX / tileWidth, dstY / tileHeight))
return;
@@ -592,7 +591,8 @@ void Being::fireMissile(Being *victim, const std::string &particle)
if (missile)
{
Particle *target = particleEngine->createChild();
- target->moveBy(Vector(0.0f, 0.0f, 32.0f));
+ target->moveBy(Vector(0.0f, 0.0f,
+ Game::instance()->getCurrentTileWidth()));
target->setLifetime(1000);
victim->controlParticle(target);