本文整理汇总了C++中CGameSettings::PolyGrids方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameSettings::PolyGrids方法的具体用法?C++ CGameSettings::PolyGrids怎么用?C++ CGameSettings::PolyGrids使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameSettings
的用法示例。
在下文中一共展示了CGameSettings::PolyGrids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
LTBOOL CPolyGridFX::Update()
{
if(!m_hObject || !m_pClientDE || !m_hServerObject)
return LTFALSE;
if(m_bWantRemove)
return LTFALSE;
// Set the flags of the polygrid based on the the server object...
uint32 dwServerFlags;
g_pCommonLT->GetObjectFlags(m_hServerObject, OFT_Flags, dwServerFlags);
if (dwServerFlags & FLAG_VISIBLE)
{
g_pCommonLT->SetObjectFlags(m_hObject, OFT_Flags, FLAG_VISIBLE, FLAG_VISIBLE);
}
else // We're hidden, no need to update...
{
g_pCommonLT->SetObjectFlags(m_hObject, OFT_Flags, 0, FLAG_VISIBLE);
return LTTRUE;
}
// Don't update if not drawn :)
uint32 dwFlags;
g_pCommonLT->GetObjectFlags(m_hObject, OFT_Flags, dwFlags);
if (!(dwFlags & FLAG_WASDRAWN) && !m_bAlwaysUpdate)
{
return LTTRUE;
}
// Update the position of the polygrid to reflect the position of the
// server object...
LTVector vPos;
g_pLTClient->GetObjectPos(m_hServerObject, &vPos);
g_pLTClient->SetObjectPos(m_hObject, &vPos);
// If we're not using polygrids (or special fx are set to the lowest
// detail setting), don't update...
if (m_bUseGlobalSettings)
{
CGameSettings* pSettings = g_pInterfaceMgr->GetSettings();
if (!pSettings) return LTTRUE;
uint8 nVal = pSettings->SpecialFXSetting();
LTBOOL bOn = pSettings->PolyGrids();
if (!bOn || nVal == RS_LOW)
{
return LTTRUE;
}
}
//if we are paused we shouldn't bother updating
if(g_pGameClientShell->IsServerPaused())
{
g_pLTClient->Common()->SetObjectFlags(m_hObject, OFT_Flags, FLAG_PAUSED, FLAG_PAUSED);
return LTTRUE;
}
else
{
g_pLTClient->Common()->SetObjectFlags(m_hObject, OFT_Flags, 0, FLAG_PAUSED);
}
// Update the plasma based on the type of plasma...
switch (m_nSurfaceType)
{
case PGSURFACE_PLASMA_FOUR_RING :
UpdateFourRingPlasma();
break;
case PGSURFACE_PLASMA_NORMAL:
UpdatePlasma();
break;
case PGSURFACE_WAVE_PROP:
UpdateWaveProp(g_pGameClientShell->GetFrameTime());
break;
default :
//default surface...
UpdatePlasma();
break;
}
if( m_sSurfaceSprite.size( ))
{
UpdateSurface();
//.........这里部分代码省略.........