diff options
Diffstat (limited to 'src/player_relations.cpp')
-rw-r--r-- | src/player_relations.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/player_relations.cpp b/src/player_relations.cpp index 610f5d04..c494dc74 100644 --- a/src/player_relations.cpp +++ b/src/player_relations.cpp @@ -88,7 +88,7 @@ PlayerRelationsManager::PlayerRelationsManager() : mDefaultPermissions(PlayerRelation::DEFAULT), mIgnoreStrategy(NULL) { -} +} void PlayerRelationsManager::clear() @@ -325,29 +325,6 @@ public: }; -class -BlinkPlayerNameDrawStrategy : public PlayerNameDrawStrategy -{ -public: - BlinkPlayerNameDrawStrategy(int count) : - mCount(count) - { - } - - virtual void draw(Player *player, Graphics *graphics, int px, int py) - { - graphics->setFont(speechFont); - if (mCount & 4) - graphics->drawText(player->getName(), px + 15, py + 30, gcn::Graphics::CENTER); - - if (mCount-- <= 0) - player->setNameDrawStrategy(NULL); - } -private: - int mCount; // Number of steps to blink -}; - - class PIS_blinkname : public PlayerIgnoreStrategy { public: @@ -359,9 +336,9 @@ public: virtual void ignore(Player *player, unsigned int flags) - { - player->setNameDrawStrategy(new BlinkPlayerNameDrawStrategy(200)); - } + { + player->flash(200); + } }; class PIS_emote : public PlayerIgnoreStrategy @@ -407,4 +384,3 @@ PlayerRelationsManager::getPlayerIgnoreStrategies() PlayerRelationsManager player_relations; - |