本文整理汇总了C++中PlayerInfo::LastSeenShipType方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerInfo::LastSeenShipType方法的具体用法?C++ PlayerInfo::LastSeenShipType怎么用?C++ PlayerInfo::LastSeenShipType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerInfo
的用法示例。
在下文中一共展示了PlayerInfo::LastSeenShipType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NumTurrets
static int NumTurrets(IshipIGC* pship)
{
PlayerInfo* pPlayer = (PlayerInfo*)pship->GetPrivateData();
const IhullTypeIGC* pHullType = trekClient.GetCore()->GetHullType(pPlayer->LastSeenShipType());
// if we have a real ship...
if (pHullType)
return pHullType->GetMaxWeapons() - pHullType->GetMaxFixedWeapons();
else
return 0;
}
示例2: HullName
static ZString HullName(ImodelIGC* pmodel)
{
if (pmodel->GetObjectType() == OT_ship)
{
PlayerInfo* pPlayer = (PlayerInfo*)((IshipIGC*)pmodel)->GetPrivateData();
IhullTypeIGC* phull = trekClient.GetCore()->GetHullType(pPlayer->LastSeenShipType());
if (phull == NULL)
return "<bug>";
else
return phull->GetName();
}
else
{
return "";
}
}
示例3: 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;
}