diff options
| author | oy <Tom_Adams@web.de> | 2011-04-02 19:51:05 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-02 19:51:05 +0200 |
| commit | ab810cab2575ffebe5e08ed6dfce55453e17f19a (patch) | |
| tree | 58aa606b38b533f4c4138568de2dcd1d0f8db248 /src/engine/client/friends.cpp | |
| parent | 401543c7a9171fd637807886eaad6bfd9efd56a5 (diff) | |
| download | zcatch-ab810cab2575ffebe5e08ed6dfce55453e17f19a.tar.gz zcatch-ab810cab2575ffebe5e08ed6dfce55453e17f19a.zip | |
fixed that player options just show players as friends not clans
Diffstat (limited to 'src/engine/client/friends.cpp')
| -rw-r--r-- | src/engine/client/friends.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/engine/client/friends.cpp b/src/engine/client/friends.cpp index c75db54e..9ef00ed1 100644 --- a/src/engine/client/friends.cpp +++ b/src/engine/client/friends.cpp @@ -44,11 +44,12 @@ const CFriendInfo *CFriends::GetFriend(int Index) const return &m_aFriends[max(0, Index%m_NumFriends)]; } -bool CFriends::IsFriend(const char *pName, const char *pClan) const +bool CFriends::IsFriend(const char *pName, const char *pClan, bool PlayersOnly) const { for(int i = 0; i < m_NumFriends; ++i) { - if((m_aFriends[i].m_aName[0] == 0 || !str_comp(m_aFriends[i].m_aName, pName)) && !str_comp(m_aFriends[i].m_aClan, pClan)) + if(!str_comp(m_aFriends[i].m_aClan, pClan) && + ((!PlayersOnly && m_aFriends[i].m_aName[0] == 0) || !str_comp(m_aFriends[i].m_aName, pName))) return true; } return false; |