diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-26 00:27:05 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-26 00:32:19 +0100 |
commit | dfcc6397848d4597b386b688f689352de6c19ae2 (patch) | |
tree | a6e8c9afd6a49ea96e4498080a96d3e06ecaebd7 /src/monster.cpp | |
parent | cd20fb3432498b8871401bdd65a143197e2a6538 (diff) | |
download | mana-dfcc6397848d4597b386b688f689352de6c19ae2.tar.gz mana-dfcc6397848d4597b386b688f689352de6c19ae2.tar.bz2 mana-dfcc6397848d4597b386b688f689352de6c19ae2.tar.xz mana-dfcc6397848d4597b386b688f689352de6c19ae2.zip |
Remove redundancy, fix variable names and other code cleanups
Diffstat (limited to 'src/monster.cpp')
-rw-r--r-- | src/monster.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/monster.cpp b/src/monster.cpp index c8abcc05..eaea6225 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -211,12 +211,10 @@ const MonsterInfo &Monster::getInfo() const #endif } -void Monster::showName(bool show) +void Monster::setShowName(bool show) { - if (mText) - { - delete mText; - } + delete mText; + if (show) { mText = new Text(getInfo().getName(), mPx + NAME_X_OFFSET, |