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:
@ -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& maleLoc = plKeyFinder::Instance().FindLocation("GlobalAvatars", "Male");
|
||||||
const plLocation& custLoc = plKeyFinder::Instance().FindLocation("CustomAvatars", name);
|
const plLocation& custLoc = plKeyFinder::Instance().FindLocation("CustomAvatars", name);
|
||||||
|
|
||||||
// Silliness to make the compiler happy with const references.
|
#ifdef PLASMA_EXTERNAL_RELEASE
|
||||||
// and don't allow players to use custom avatars
|
// Try global. If that doesn't work, players default to male.
|
||||||
const plLocation& loc = (globalLoc.IsValid() ? globalLoc : isPlayer ? maleLoc : custLoc);
|
// 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;
|
const char* theName = name;
|
||||||
if ( isPlayer && !globalLoc.IsValid() )
|
if ( loc == maleLoc )
|
||||||
theName = "Male";
|
theName = "Male";
|
||||||
|
|
||||||
if (loc.IsValid())
|
if (loc.IsValid())
|
||||||
|
Reference in New Issue
Block a user