2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Fix handling of custom avvies for internal clients

This commit is contained in:
Branan Purvine-Riley
2011-04-17 14:14:07 -07:00
parent 481de14091
commit 6352d95272

View File

@ -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())