diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-27 23:50:16 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-27 23:50:16 +0000 |
commit | 30063f42cc8d13ed241a52b90e63c2c68599115e (patch) | |
tree | 68868a0aa04007a0ad4a62d97556c27b48f057d7 /src/engine.cpp | |
parent | 0ecae988adfa88cb6b8803a9f5b7215221fceb74 (diff) | |
download | mana-30063f42cc8d13ed241a52b90e63c2c68599115e.tar.gz mana-30063f42cc8d13ed241a52b90e63c2c68599115e.tar.bz2 mana-30063f42cc8d13ed241a52b90e63c2c68599115e.tar.xz mana-30063f42cc8d13ed241a52b90e63c2c68599115e.zip |
autoTarget is now a Being*, also may have fixed related crash and added label
to show current target.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 938068b7..75d4ba2f 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -267,7 +267,11 @@ void Engine::logic() being->logic(); - if (being->action == MONSTER_DEAD && being->frame >= 20) { + if (being->action == MONSTER_DEAD && being->frame >= 20) + { + if (autoTarget == being) { + autoTarget = NULL; + } delete being; beingIterator = beings.erase(beingIterator); } @@ -400,8 +404,10 @@ void Engine::draw() if (being->action == MONSTER_DEAD) { monsterset[being->job - 1002]->spriteset[dir + 4 * MONSTER_DEAD]->draw(screen, being->text_x + 30, being->text_y + 40); - if (autoTarget == being->id) - autoTarget = 0; + + if (autoTarget == being) { + autoTarget = NULL; + } } else { monsterset[being->job-1002]->spriteset[dir + 4 * mf]->draw( |