本文整理汇总了C++中C4PlayerInfo::IsRemoved方法的典型用法代码示例。如果您正苦于以下问题:C++ C4PlayerInfo::IsRemoved方法的具体用法?C++ C4PlayerInfo::IsRemoved怎么用?C++ C4PlayerInfo::IsRemoved使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C4PlayerInfo
的用法示例。
在下文中一共展示了C4PlayerInfo::IsRemoved方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void C4GameSave::WriteDescPlayers(StdStrBuf &sBuf, bool fByTeam, int32_t idTeam)
{
// write out all players; only if they match the given team if specified
C4PlayerInfo *pPlr; bool fAnyPlrWritten = false;
for (int i = 0; (pPlr = Game.PlayerInfos.GetPlayerInfoByIndex(i)); i++)
if (pPlr->HasJoined() && !pPlr->IsRemoved() && !pPlr->IsInvisible())
{
if (fByTeam)
{
if (idTeam)
{
// match team
if (pPlr->GetTeam() != idTeam) continue;
}
else
{
// must be in no known team
if (Game.Teams.GetTeamByID(pPlr->GetTeam())) continue;
}
}
if (fAnyPlrWritten)
sBuf.Append(", ");
else if (fByTeam && idTeam)
{
C4Team *pTeam = Game.Teams.GetTeamByID(idTeam);
if (pTeam) sBuf.AppendFormat("%s: ", pTeam->GetName());
}
sBuf.Append(pPlr->GetName());
fAnyPlrWritten = true;
}
if (fAnyPlrWritten) WriteDescLineFeed(sBuf);
}