本文整理汇总了C++中CChar::GetTopZ方法的典型用法代码示例。如果您正苦于以下问题:C++ CChar::GetTopZ方法的具体用法?C++ CChar::GetTopZ怎么用?C++ CChar::GetTopZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChar
的用法示例。
在下文中一共展示了CChar::GetTopZ方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Ship_ListObjs
int CItemMulti::Ship_ListObjs( CObjBase ** ppObjList )
{
// List all the objects in the structure.
// Move the ship and everything on the deck
// If too much stuff. then some will fall overboard. hehe.
if ( ! IsTopLevel())
return 0;
int iMaxDist = Multi_GetMaxDist();
// always list myself first. All other items must see my new region !
int iCount = 0;
ppObjList[iCount++] = this;
CWorldSearch AreaChar( GetTopPoint(), iMaxDist );
while ( iCount < MAX_MULTI_LIST_OBJS )
{
CChar * pChar = AreaChar.GetChar();
if ( pChar == NULL )
break;
if ( pChar->IsClient())
{
pChar->GetClient()->addPause(); // get rid of flicker. for anyone even seeing this.
}
if ( ! m_pRegion->IsInside2d( pChar->GetTopPoint()))
continue;
int zdiff = pChar->GetTopZ() - GetTopZ();
if ( abs( zdiff ) > 3 )
continue;
ppObjList[iCount++] = pChar;
}
CWorldSearch AreaItem( GetTopPoint(), iMaxDist );
while ( iCount < MAX_MULTI_LIST_OBJS )
{
CItem * pItem = AreaItem.GetItem();
if ( pItem == NULL )
break;
if ( pItem == this ) // already listed.
continue;
if ( ! Multi_IsPartOf( pItem ))
{
if ( ! m_pRegion->IsInside2d( pItem->GetTopPoint()))
continue;
if ( ! pItem->IsMovable())
continue;
int zdiff = pItem->GetTopZ() - GetTopZ();
if ( abs( zdiff ) > 3 )
continue;
}
ppObjList[iCount++] = pItem;
}
return( iCount );
}