diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-06-13 13:16:16 -0600 |
commit | e8bea8a6edf69e824a922adeb5e697111ceabe90 (patch) | |
tree | db1937956bc585b300f2a2c8312af4ad5bf924de /src/actorsprite.cpp | |
parent | 593fd2b831304c8e421589aab0fb158e4b7e9c35 (diff) | |
parent | 0b15a3ad32838134384524ce4af95d65b0b4e5da (diff) | |
download | mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.gz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.bz2 mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.tar.xz mana-e8bea8a6edf69e824a922adeb5e697111ceabe90.zip |
Merge remote branch '1.0/1.0'
Conflicts:
data/graphics/CMakeLists.txt
data/graphics/Makefile.am
src/client.cpp
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r-- | src/actorsprite.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index a7821699..1104d810 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -43,6 +43,7 @@ ImageSet *ActorSprite::targetCursorImages[2][NUM_TC]; SimpleAnimation *ActorSprite::targetCursor[2][NUM_TC]; +bool ActorSprite::loaded = false; ActorSprite::ActorSprite(int id): mId(id), @@ -345,12 +346,21 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display, void ActorSprite::load() { + if (loaded) + unload(); + initTargetCursor(); + + loaded = true; } void ActorSprite::unload() { + if (!loaded) + return; + cleanupTargetCursors(); + loaded = false; } static const char *cursorType(int type) |