本文整理汇总了C++中C_BaseObject::GetOwner方法的典型用法代码示例。如果您正苦于以下问题:C++ C_BaseObject::GetOwner方法的具体用法?C++ C_BaseObject::GetOwner怎么用?C++ C_BaseObject::GetOwner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类C_BaseObject
的用法示例。
在下文中一共展示了C_BaseObject::GetOwner方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FireGameEvent
//.........这里部分代码省略.........
if ( pVictim && pTFKiller && pTFKiller->m_Shared.IsPlayerDominated( pVictim->entindex() ) )
{
if ( !pKiller->IsAlive() )
{
m_pFreezeLabel->SetText( "#FreezePanel_Nemesis_Dead" );
}
else
{
m_pFreezeLabel->SetText( "#FreezePanel_Nemesis" );
}
}
else
{
if ( !pKiller->IsAlive() )
{
m_pFreezeLabel->SetText( "#FreezePanel_Killer_Dead" );
}
else
{
m_pFreezeLabel->SetText( "#FreezePanel_Killer" );
}
}
m_pBasePanel->SetDialogVariable( "killername", g_PR->GetPlayerName( m_iKillerIndex ) );
if ( m_pAvatar )
{
m_pAvatar->SetPlayer( (C_BasePlayer*)pKiller );
}
}
else if ( pKiller->IsBaseObject() )
{
C_BaseObject *pObj = assert_cast<C_BaseObject *>( pKiller );
C_TFPlayer *pOwner = pObj->GetOwner();
Assert( pOwner && "Why does this object not have an owner?" );
if ( pOwner )
{
m_iKillerIndex = pOwner->entindex();
m_pBasePanel->SetDialogVariable( "killername", g_PR->GetPlayerName( m_iKillerIndex ) );
if ( m_pAvatar )
{
m_pAvatar->SetPlayer( pOwner );
}
pKiller = pOwner;
}
if ( m_pFreezeLabel )
{
if ( pKiller && !pKiller->IsAlive() )
{
m_pFreezeLabel->SetText( "#FreezePanel_KillerObject_Dead" );
}
else
{
m_pFreezeLabel->SetText( "#FreezePanel_KillerObject" );
}
}
const char *pszStatusName = pObj->GetStatusName();
wchar_t *wszLocalized = g_pVGuiLocalize->Find( pszStatusName );
if ( !wszLocalized )