本文整理汇总了C++中CEntityAlive::GetLevelDeathTime方法的典型用法代码示例。如果您正苦于以下问题:C++ CEntityAlive::GetLevelDeathTime方法的具体用法?C++ CEntityAlive::GetLevelDeathTime怎么用?C++ CEntityAlive::GetLevelDeathTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEntityAlive
的用法示例。
在下文中一共展示了CEntityAlive::GetLevelDeathTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ActorUse
void CActor::ActorUse()
{
if (m_holder)
{
CGameObject* GO = smart_cast<CGameObject*>(m_holder);
NET_Packet P;
CGameObject::u_EventGen (P, GEG_PLAYER_DETACH_HOLDER, ID());
P.w_u16 (GO->ID());
CGameObject::u_EventSend (P);
return;
}
if(character_physics_support()->movement()->PHCapture())
character_physics_support()->movement()->PHReleaseObject();
if(m_pUsableObject && NULL==m_pObjectWeLookingAt->cast_inventory_item())
{
m_pUsableObject->use(this);
}
if ( m_pInvBoxWeLookingAt && m_pInvBoxWeLookingAt->nonscript_usable() )
{
CUIGameSP* pGameSP = smart_cast<CUIGameSP*>(CurrentGameUI());
if ( pGameSP ) //single
{
if ( !m_pInvBoxWeLookingAt->closed() )
{
pGameSP->StartCarBody( this, m_pInvBoxWeLookingAt );
}
}
return;
}
if(!m_pUsableObject||m_pUsableObject->nonscript_usable())
{
if(m_pPersonWeLookingAt)
{
CEntityAlive* pEntityAliveWeLookingAt =
smart_cast<CEntityAlive*>(m_pPersonWeLookingAt);
VERIFY(pEntityAliveWeLookingAt);
if (IsGameTypeSingle())
{
if(pEntityAliveWeLookingAt->g_Alive())
{
TryToTalk();
}else
{
//только если находимся в режиме single
CUIGameSP* pGameSP = smart_cast<CUIGameSP*>(CurrentGameUI());
if ( pGameSP )
{
if ( !m_pPersonWeLookingAt->deadbody_closed_status() )
{
if(pEntityAliveWeLookingAt->AlreadyDie() &&
pEntityAliveWeLookingAt->GetLevelDeathTime()+3000 < Device.dwTimeGlobal)
// 99.9% dead
pGameSP->StartCarBody(this, m_pPersonWeLookingAt );
}
}
}
}
}
collide::rq_result& RQ = HUD().GetCurrentRayQuery();
CPhysicsShellHolder* object = smart_cast<CPhysicsShellHolder*>(RQ.O);
u16 element = BI_NONE;
if(object)
element = (u16)RQ.element;
if(object && Level().IR_GetKeyState(DIK_LSHIFT))
{
bool b_allow = !!pSettings->line_exist("ph_capture_visuals",object->cNameVisual());
if(b_allow && !character_physics_support()->movement()->PHCapture())
{
character_physics_support()->movement()->PHCaptureObject( object, element );
}
}
else
{
if (object && smart_cast<CHolderCustom*>(object))
{
NET_Packet P;
CGameObject::u_EventGen (P, GEG_PLAYER_ATTACH_HOLDER, ID());
P.w_u16 (object->ID());
CGameObject::u_EventSend (P);
return;
}
}
}
}