summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorBlue <bluesansdouze@gmail.com>2009-05-13 20:35:44 +0200
committerBlue <bluesansdouze@gmail.com>2009-05-13 20:35:44 +0200
commit22685431a23b05d66af28abda488d0891b1c0a34 (patch)
treea207b9230833abbed3da751ca7e3c4ccdc8e9783 /src/localplayer.cpp
parent9071a692116745f2cafd8556cbff28095910730e (diff)
parentb5ad7e490f0f429a5abac2acae48ecf25485256f (diff)
downloadmana-client-22685431a23b05d66af28abda488d0891b1c0a34.tar.gz
mana-client-22685431a23b05d66af28abda488d0891b1c0a34.tar.bz2
mana-client-22685431a23b05d66af28abda488d0891b1c0a34.tar.xz
mana-client-22685431a23b05d66af28abda488d0891b1c0a34.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 059ccd31..c1423190 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -236,14 +236,17 @@ void LocalPlayer::setAction(Action action, int attackType)
Player::setAction(action, attackType);
}
-void LocalPlayer::setGM()
-{
- mIsGM = !mIsGM;
- mNameColor = mIsGM ?
- &guiPalette->getColor(Palette::GM) :
- &guiPalette->getColor(Palette::PLAYER);
- setName(getName());
- config.setValue(getName() + "GMassert", mIsGM);
+void LocalPlayer::setGM(bool gm)
+{
+ mIsGM = gm;
+}
+
+void LocalPlayer::setGMLevel(int level)
+{
+ mGMLevel = level;
+
+ if (level > 0)
+ setGM(true);
}
void LocalPlayer::setName(const std::string &name)