Browse Source

Fix handling of custom avvies for internal clients

Branan Purvine-Riley 14 years ago
parent
commit
6352d95272
  1. 13
      Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp

13
Sources/Plasma/PubUtilLib/plAvatar/plAvatarMgr.cpp

@ -178,12 +178,17 @@ plKey plAvatarMgr::LoadAvatar(const char *name, const char *accountName, bool is
const plLocation& maleLoc = plKeyFinder::Instance().FindLocation("GlobalAvatars", "Male");
const plLocation& custLoc = plKeyFinder::Instance().FindLocation("CustomAvatars", name);
// Silliness to make the compiler happy with const references.
// and don't allow players to use custom avatars
const plLocation& loc = (globalLoc.IsValid() ? globalLoc : isPlayer ? maleLoc : custLoc);
#ifdef PLASMA_EXTERNAL_RELEASE
// Try global. If that doesn't work, players default to male.
// If not a player, try custLoc. If that doesn't work, fall back to male
const plLocation& loc = (globalLoc.IsValid() ? globalLoc : isPlayer ? maleLoc : custLoc.IsValid() ? custLoc : maleLoc);
#else
// Try global. If that doesn't work try custom. Otherwise fall back to male
const plLocation& loc = (globalLoc.IsValid() ? globalLoc : custLoc.IsValid() ? custLoc : maleLoc);
#endif
const char* theName = name;
if ( isPlayer && !globalLoc.IsValid() )
if ( loc == maleLoc )
theName = "Male";
if (loc.IsValid())

Loading…
Cancel
Save