本文整理汇总了C++中UpdateVisibility函数的典型用法代码示例。如果您正苦于以下问题:C++ UpdateVisibility函数的具体用法?C++ UpdateVisibility怎么用?C++ UpdateVisibility使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了UpdateVisibility函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SystemMessage
//.gm active
bool ChatHandler::HandleGMActiveCommand(const char* args, WorldSession* m_session)
{
auto player = m_session->GetPlayer();
bool toggle_no_notice = std::string(args) == "no_notice" ? true : false;
if (player->isGMFlagSet())
{
if (!toggle_no_notice)
{
SystemMessage(m_session, "GM Flag removed.");
BlueSystemMessage(m_session, "<GM> Will no longer show in chat messages or above your name until you use this command again.");
}
player->removePlayerFlags(PLAYER_FLAG_GM);
player->SetFaction(player->GetInitialFactionId());
player->UpdatePvPArea();
player->UpdateVisibility();
}
else
{
if (player->hasPlayerFlags(PLAYER_FLAG_DEVELOPER))
HandleGMDevTagCommand("no_notice", m_session);
SystemMessage(m_session, "GM Flag set.");
BlueSystemMessage(m_session, "<GM> will now appear above your name and in chat messages until you use this command again.");
player->addPlayerFlags(PLAYER_FLAG_GM);
player->SetFaction(35);
player->RemovePvPFlag();
player->UpdateVisibility();
}
return true;
}
示例2: C_LowViolenceHostageDeathModel
//-----------------------------------------------------------------------------
C_BaseAnimating * C_CHostage::BecomeRagdollOnClient()
{
if ( g_RagdollLVManager.IsLowViolence() )
{
// We can't just play the low-violence anim ourselves, since we're about to be deleted by the server.
// So, let's create another entity that can play the anim and stick around.
C_LowViolenceHostageDeathModel *pLowViolenceModel = new C_LowViolenceHostageDeathModel();
m_createdLowViolenceRagdoll = pLowViolenceModel->SetupLowViolenceModel( this );
if ( m_createdLowViolenceRagdoll )
{
UpdateVisibility();
g_HostageRagdolls.AddToTail( pLowViolenceModel );
return pLowViolenceModel;
}
else
{
// if we don't have a low-violence death anim, don't create a ragdoll.
return NULL;
}
}
C_BaseAnimating *pRagdoll = BaseClass::BecomeRagdollOnClient();
if ( pRagdoll && pRagdoll != this )
{
g_HostageRagdolls.AddToTail( pRagdoll );
}
return pRagdoll;
}
示例3: UpdateVisibility
void DiInstanceBatch::CullingUpdate( DiRenderBatchGroup* group, DiCamera* )
{
mDirtyAnimation = false;
UpdateVisibility();
mPrimitiveCount = mMeshReference->GetSubMesh(mCreator->mSubMeshIdx)->GetPrimitiveCount();
mPrimitiveCount *= GetModelNums();
if( mVisible )
{
if (HasSkeleton())
{
InstancedModelVec::const_iterator itor = mInstancedModels.begin();
InstancedModelVec::const_iterator end = mInstancedModels.end();
while( itor != end )
{
mDirtyAnimation |= (*itor)->UpdateAnimation();
++itor;
}
}
group->AddRenderUnit( this );
}
mVisible = true;
}
示例4: LookupSequence
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void C_NPC_Puppet::ClientThink( void )
{
if ( m_hAnimationTarget == NULL )
return;
C_BaseAnimating *pTarget = m_hAnimationTarget->GetBaseAnimating();
if ( pTarget == NULL )
return;
int nTargetSequence = pTarget->GetSequence();
const char *pSequenceName = pTarget->GetSequenceName( nTargetSequence );
int nSequence = LookupSequence( pSequenceName );
if ( nSequence >= 0 )
{
if ( nSequence != GetSequence() )
{
SetSequence( nSequence );
UpdateVisibility();
}
SetCycle( pTarget->GetCycle() );
SetPlaybackRate( pTarget->GetPlaybackRate() );
}
}
示例5: UpdateVisibility
void SuggestionsSidebarBlock::ClearMessage()
{
m_msgPresent = false;
m_msgText->SetAndWrapLabel("");
UpdateVisibility();
m_parent->Layout();
}
示例6: SetSolid
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool C_FuncPhysicsRespawnZone::Initialize( void )
{
if ( InitializeAsClientEntity( STRING(GetModelName()), RENDER_GROUP_OPAQUE_ENTITY ) == false )
return false;
SetSolid( SOLID_BSP );
AddSolidFlags( FSOLID_NOT_SOLID );
AddSolidFlags( FSOLID_TRIGGER );
SetMoveType( MOVETYPE_NONE );
const model_t *mod = GetModel();
if ( mod )
{
Vector mins, maxs;
modelinfo->GetModelBounds( mod, mins, maxs );
SetCollisionBounds( mins, maxs );
}
Spawn();
AddEffects( EF_NODRAW );
UpdatePartitionListEntry();
CollisionProp()->UpdatePartition();
UpdateVisibility();
SetNextClientThink( gpGlobals->curtime + (cl_phys_props_respawnrate.GetFloat() * RandomFloat(1.0,1.1)) );
return true;
}
示例7: UpdateVisibility
bool CGUIFixedListContainer::OnMessage(CGUIMessage& message)
{
if (message.GetControlId() == GetID() )
{
if (message.GetMessage() == GUI_MSG_ITEM_SELECT)
{
if (m_loading)
{
m_savedSelected = message.GetParam1();
}
else
{
UpdateVisibility();
SelectItem(message.GetParam1());
}
return true;
}
else if (message.GetMessage() == GUI_MSG_PAGE_UP)
{
CAction action;
action.id = ACTION_PAGE_UP;
return OnAction(action);
}
else if (message.GetMessage() == GUI_MSG_PAGE_DOWN)
{
CAction action;
action.id = ACTION_PAGE_DOWN;
return OnAction(action);
}
}
return CGUIBaseContainer::OnMessage(message);
}
示例8: UpdateVisibility
void DiInstanceBatch::Update(DiCamera* camera)
{
mCurrentCamera = camera;
mDirtyAnimation = false;
UpdateVisibility();
mPrimitiveCount = mMeshReference->GetSubMesh(mCreator->mSubMeshIdx)->GetPrimitiveCount();
mPrimitiveCount *= GetModelNums();
if (mVisible)
{
if (HasSkeleton())
{
auto itor = mInstancedModels.begin();
auto end = mInstancedModels.end();
while (itor != end)
{
mDirtyAnimation |= (*itor)->UpdateAnimation();
++itor;
}
}
mAddToBatch = true;
}
mVisible = true;
}
示例9: UpdateSuggestionsMenu
void SuggestionsSidebarBlock::ClearSuggestions()
{
m_pendingQueries = 0;
m_suggestions.clear();
UpdateSuggestionsMenu();
UpdateVisibility();
}
示例10: Show
void Show(const PixelRect &rc) override {
assert(!visible);
visible = true;
UpdatePositions(rc);
UpdateVisibility();
}
示例11: UpdateVisibility
bool psEntityLabels::HandleEvent(iEvent& /*ev*/)
{
static unsigned int count = 0;
if (++count%10 != 0) // Update once every 10th frame
return false;
if (celClient->GetMainPlayer() == NULL)
return false; // Not loaded yet
if (visItems == LABEL_ALWAYS || visCreatures == LABEL_ALWAYS)
{
UpdateVisibility();
}
if (visItems == LABEL_ONMOUSE || visCreatures == LABEL_ONMOUSE)
{
UpdateMouseover();
}
if (visItems == LABEL_ONTARGET || visCreatures == LABEL_ONTARGET)
{
UpdateTarget();
}
return false;
}
示例12: SetNextClientThink
void C_NEOPlayer::OnDataChanged( DataUpdateType_t updateType )
{
BaseClass::OnDataChanged( updateType );
if ( updateType == DATA_UPDATE_CREATED )
SetNextClientThink( -1293.f );
UpdateVisibility();
}
示例13: Update
void Update(bool _edit, bool _mutate, bool _down, bool _up) {
show_edit = _edit;
show_mutate = _mutate;
show_down = _down;
show_up = _up;
if (visible)
UpdateVisibility();
}
示例14: GetTextHtml
void MySwitchableTextEditor::SetEditorMode(bool edit)
{
if(edit == m_editor_mode)
return;
QString text = GetTextHtml();
m_editor_mode = edit;
UpdateVisibility();
SetTextHtml(text);
}
示例15: UpdateCL
void CCustomDetector::UpdateCL()
{
inherited::UpdateCL();
UpdateVisibility ();
if( !IsWorking() ) return;
UpfateWork ();
}