@
Eclipse Studio
# ClientGameLogic.cpp
IMPL_PACKET_FUNC(ClientGameLogic, PKT_S2C_PlayerNameJoined)
{
r3d_assert(n.peerId < R3D_ARRAYSIZE(playerNames));
r3dscpy(playerNames[n.peerId].Gamertag, n.gamertag);
playerNames[n.peerId].plrRep = n.Reputation;
playerNames[n.peerId].isLegend = (n.flags & 1)?true:false;
playerNames[n.peerId].isPunisher = (n.flags & 2)?true:false;
playerNames[n.peerId].MeCustomerID = n.CustomerID;
playerNames[n.peerId].isDev = (n.flags & 2)?true:false; // dev tag
// dev tag
if ( playerNames[n.peerId].isLegend = true) // AccountType == 0
{
playerNames[n.peerId].isDev = false;
playerNames[n.peerId].isPunisher = false;
}
if (playerNames[n.peerId].isPunisher = true) // IsPunisher == 1
{
playerNames[n.peerId].isDev = false;
playerNames[n.peerId].isLegend = false;
}
if (playerNames[n.peerId].isDev = true) // IsDeveloper == 1
{
playerNames[n.peerId].isLegend = false;
playerNames[n.peerId].isPunisher = false;
}
}
# HUDDisplay.cpp
uint32_t flags = 0;
if(gUserProfile.ProfileData.isDevAccount)
{
flags|=2; // dev tag
}
if(gUserProfile.ProfileData.isPunisher)
{
flags|=2;
}
if(gUserProfile.ProfileData.AccountType==0)
{
flags|=1;
}
if(gUserProfile.ProfileData.AccountType==5)
{
flags|=3;
}
char tmpMsg[1024];
const char* tabNames[] = {"[PROXIMITY]", "[GLOBAL]", "[CLAN]", "[GROUP]"};
const char* tabNamesColor[] = {"#00A000", "#13bbeb", "#de13eb", "#ffa900"};
const char* userNameColor[] = {"#ffffff", "#ffa800"};
bool isUserLegend = (flags&1)?true:false;
bool isUserPunisher = (flags&2)?true:false;
bool isUserDev = (flags&2)?true:false; // dev tag
const char* userColor = userNameColor[isUserLegend?0:1];
const char* textColor = "#d0d0d0";
const char* namePrefix = "";
@
Server
# ServerGameLogic.cpp
PKT_S2C_PlayerNameJoined_s n;
n.peerId = (BYTE)peerId;
r3dscpy(n.gamertag, plr->userName);
n.flags = 0;
if(plr->profile_.ProfileData.AccountType == 0) // legend
n.flags |= 1;
if(plr->profile_.ProfileData.isPunisher)
n.flags |= 2;
if(plr->profile_.ProfileData.isDevAccount) // dev tag
n.flags |= 2;
if(peers_
.status_ >= PEER_PLAYING && peers_.player) {
PKT_S2C_PlayerNameJoined_s n;
n.peerId = i;
r3dscpy(n.gamertag, peers_.player->userName);
n.flags = 0;
if(peers_.player->profile_.ProfileData.AccountType == 0) // legend
n.flags |= 1;
if(peers_.player->profile_.ProfileData.isPunisher)
n.flags |= 2;
if(peers_.player->profile_.ProfileData.isDevAccount) // dev tag
n.flags |= 2;