本文整理汇总了C++中PlayerInfo::LastSeenState方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerInfo::LastSeenState方法的具体用法?C++ PlayerInfo::LastSeenState怎么用?C++ PlayerInfo::LastSeenState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerInfo
的用法示例。
在下文中一共展示了PlayerInfo::LastSeenState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MannedTurrets
static int MannedTurrets(IshipIGC* pshipParent)
{
// loop through all of the ships on that side and count the ones
// that are turrets of this.
int cMannedTurrets = 0;
const ShipListIGC* shipList = pshipParent->GetSide()->GetShips();
for (const ShipLinkIGC* lShip = shipList->first(); lShip; lShip = lShip->next())
{
IshipIGC* pship = lShip->data();
PlayerInfo* pplayer = (PlayerInfo*)pship->GetPrivateData();
if (pplayer->LastSeenState() == c_ssTurret)
{
PlayerInfo* pplayerParent = trekClient.FindPlayer(pplayer->LastSeenParent());
if (pplayerParent && pplayerParent->GetShip() == pshipParent)
cMannedTurrets++;
}
}
return cMannedTurrets;
}
示例2: CanBoard
static bool CanBoard(IshipIGC* pship)
{
PlayerInfo* pPlayer = (PlayerInfo*)pship->GetPrivateData();
if (pship != trekClient.GetShip()
&& pship->GetSide() == trekClient.GetSide()
&& pPlayer->LastSeenState() == c_ssDocked
&& pship->GetPilotType() >= c_ptPlayer)
{
HullID hid = pPlayer->LastSeenShipType();
assert (hid != NA);
IhullTypeIGC* pht = trekClient.m_pCoreIGC->GetHullType(hid);
assert (pht);
if ((trekClient.GetShip()->GetPilotType() == c_ptCheatPlayer) ||
(pht->GetMaxFixedWeapons() != pht->GetMaxWeapons()))
{
return true;
}
}
return false;
}