diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-19 03:22:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-19 03:22:09 +0300 |
commit | 6b06886cfd94b3efe613831deb73ce0d657f9fde (patch) | |
tree | a697a65c56ef8c087a9f9d9168dde167d2818876 /src | |
parent | 93eec460598391093691eaa3d46c6e93538581fe (diff) | |
download | manaplus-6b06886cfd94b3efe613831deb73ce0d657f9fde.tar.gz manaplus-6b06886cfd94b3efe613831deb73ce0d657f9fde.tar.bz2 manaplus-6b06886cfd94b3efe613831deb73ce0d657f9fde.tar.xz manaplus-6b06886cfd94b3efe613831deb73ce0d657f9fde.zip |
Fix update gm badge if group was changed on the fly.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 11 | ||||
-rw-r--r-- | src/being/being.h | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index bb921f92f..3b012fd90 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3669,8 +3669,6 @@ void Being::setGM(const bool gm) restrict2 if (mIsGM != gm) { mIsGM = gm; - - showGmBadge(mIsGM); updateColors(); } } @@ -5581,3 +5579,12 @@ Being *Being::createBeing(const BeingId id, map); return being; } + +void Being::setGroupId(const int id) +{ + if (mGroupId != id) + { + mGroupId = id; + showGmBadge(id != 0); + } +} diff --git a/src/being/being.h b/src/being/being.h index fe8bb4c6a..11593a1ea 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -1085,8 +1085,7 @@ class Being notfinal : public ActorSprite, uint16_t getTeamId() const restrict2 noexcept2 A_WARN_UNUSED { return mTeamId; } - virtual void setGroupId(const int id) - { mGroupId = id; } + virtual void setGroupId(const int id); int getGroupId() const noexcept2 A_WARN_UNUSED { return mGroupId; } |