• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsPortActive函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IsPortActive函数的典型用法代码示例。如果您正苦于以下问题:C++ IsPortActive函数的具体用法?C++ IsPortActive怎么用?C++ IsPortActive使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IsPortActive函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: UpdateUIElement

void CFlashUIWorldScreenPosNode::ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
{
    if ( event == eFE_Initialize )
    {
        UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
    }
    else if ( event == eFE_Activate )
    {
        if ( IsPortActive( pActInfo, eI_UIElement ) )
        {
            UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
        }

        if ( IsPortActive( pActInfo, eI_Get ) )
        {
            const int instanceId = GetPortInt(pActInfo, eI_InstanceID);
            Vec3 worldPos = GetPortVec3(pActInfo, eI_WorldPos);
            Vec3 offset = GetPortVec3(pActInfo, eI_Offset);
            const bool scaleMode = GetPortBool(pActInfo, eI_ScaleMode);

            SPerInstanceCall3< Vec3&, Vec3&, bool > caller;
            if ( !caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIWorldScreenPosNode::GetScreenPosFromWorld), worldPos, offset, scaleMode, false) )
            {
                UIACTION_WARNING( "FG: UIElement \"%s\" called get screenpos for multiple instances! (passed instanceId %i), referenced at node \"%s\"", GetPortString(pActInfo, eI_UIElement).c_str(), instanceId, pActInfo->pGraph->GetNodeTypeName( pActInfo->myID ) );
            }

            ActivateOutput( pActInfo, eO_ScreenPos, worldPos);
            ActivateOutput( pActInfo, eO_Scale, offset.z);
            ActivateOutput( pActInfo, eO_IsOnScreen, offset.x == 0 && offset.y == 0);
            offset.z = 0;
            ActivateOutput( pActInfo, eO_OverScanBorder, offset);
            ActivateOutput( pActInfo, eO_OnGet, true );
        }
    }
}
开发者ID:souxiaosou,项目名称:FireNET,代码行数:35,代码来源:FlashUIDisplayNodes.cpp


示例2: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{
		case eFE_Initialize:
			break;
		case eFE_Activate:
      if (IsPortActive(pActInfo, EIP_Enable))
      {
          CActor* pLocalActor = static_cast<CActor*>(g_pGame->GetIGameFramework()->GetClientActor());
          if ( pLocalActor != NULL)
          {
            PlayerActor::Stumble::StumbleParameters stumbleParameters;
            stumbleParameters.minDamping   = GetPortFloat(pActInfo, EIP_MinDamping);
            stumbleParameters.maxDamping   = GetPortFloat(pActInfo, EIP_MaxDamping);

            stumbleParameters.periodicTime = GetPortFloat(pActInfo, EIP_PeriodicTime);
            stumbleParameters.strengthX    = GetPortFloat(pActInfo, EIP_StrengthX);
            stumbleParameters.strengthY    = GetPortFloat(pActInfo, EIP_StrengthY);
            stumbleParameters.randomness   = GetPortFloat(pActInfo, EIP_Randomness);

            pLocalActor->EnableStumbling(&stumbleParameters);
          }
      }
      else if (IsPortActive(pActInfo, EIP_Disable))
			{
        CActor* pLocalActor = static_cast<CActor*>(g_pGame->GetIGameFramework()->GetClientActor());
        if ( pLocalActor != NULL)
        {
          pLocalActor->DisableStumbling();
        }
			}
			break;
		}
	}
开发者ID:Kufusonic,项目名称:Work-in-Progress-Sonic-Fangame,代码行数:35,代码来源:FlowPlayerStumble.cpp


示例3: GetPortFloat

void CFlowNode_ScreenFader::ProcessActivateEvent(SActivationInfo* activationInformation)
{
	if (InputEntityIsLocalPlayer(activationInformation) == false)
		return;

	if (IsPortActive(activationInformation, eInputPorts_FadeIn))
	{
		const float fadeInTime = GetPortFloat(activationInformation, eInputPorts_FadeInTime);
		const Vec3 fadeColor = GetPortVec3(activationInformation, eInputPorts_FadeColor);
		const string texture = GetPortString(activationInformation, eInputPorts_Texture);
		const bool useCurrentColor = GetPortBool(activationInformation, eInputPorts_UseCurrentColor);
		ColorF color;
		color.Set(fadeColor.x, fadeColor.y, fadeColor.z);
		m_environment.GetGame().FadeInScreen(texture, color, fadeInTime, useCurrentColor);
	}
	else if (IsPortActive(activationInformation, eInputPorts_FadeOut))
	{
		const float fadeOutTime = GetPortFloat(activationInformation, eInputPorts_FadeOutTime);
		const Vec3 fadeColor = GetPortVec3(activationInformation, eInputPorts_FadeColor);
		const string texture = GetPortString(activationInformation, eInputPorts_Texture);
		const bool useCurrentColor = GetPortBool(activationInformation, eInputPorts_UseCurrentColor);
		ColorF color;
		color.Set(fadeColor.x, fadeColor.y, fadeColor.z);
		m_environment.GetGame().FadeOutScreen(texture, color, fadeOutTime, useCurrentColor);	
	}

}
开发者ID:aronarts,项目名称:FireNET,代码行数:27,代码来源:ScreenFaderNode.cpp


示例4: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{
		case eFE_Activate:
			{
				CPlayer* pClientPlayer = (CPlayer*)g_pGame->GetIGameFramework()->GetClientActor();
				if (pClientPlayer)
				{
					if (IsPortActive(pActInfo, INP_ENABLE))
					{
						if (gEnv->IsCutscenePlaying())
							pClientPlayer->GetPlayerHealthGameEffect().SetActive( true );  
						pClientPlayer->GetPlayerHealthGameEffect().ExternalSetEffectIntensity( GetPortFloat( pActInfo, INP_INTENSITY ));
						pClientPlayer->GetPlayerHealthGameEffect().EnableExternalControl( true );
					}
					if (IsPortActive(pActInfo, INP_INTENSITY))
						pClientPlayer->GetPlayerHealthGameEffect().ExternalSetEffectIntensity( GetPortFloat( pActInfo, INP_INTENSITY ));
					if (IsPortActive(pActInfo, INP_DISABLE))
					{
						pClientPlayer->GetPlayerHealthGameEffect().EnableExternalControl( false );
						if (gEnv->IsCutscenePlaying())
							pClientPlayer->GetPlayerHealthGameEffect().SetActive( false );
					}
				}
				break;
			}
		}
	}
开发者ID:Kufusonic,项目名称:Work-in-Progress-Sonic-Fangame,代码行数:29,代码来源:FlowPostFXNodes.cpp


示例5: ProcessEvent

    virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
    {
        if (InputEntityIsLocalPlayer( pActInfo ))
        {
            switch (event)
            {
            case eFE_Initialize:
            {
                m_actInfo = *pActInfo;
                Register(true);
            }
            break;

            case eFE_Activate:
            {
                m_actInfo = *pActInfo;
                if (IsPortActive(pActInfo, EIP_Enable))
                {
                    Register(true);
                }
                if (IsPortActive(pActInfo, EIP_Disable))
                {
                    Register(false);
                }
            }
            break;
            }
        }
    }
开发者ID:souxiaosou,项目名称:FireNET,代码行数:29,代码来源:FlowNodesInput.cpp


示例6: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
	{
		switch(event)
		{
		case eFE_Initialize:
			m_actInfo = *pActInfo;
			CMiniMapInfo::GetInstance()->UpdateLevelInfo();
			m_entityId = GetEntityId(pActInfo);
			break;

		case eFE_Activate:
			if(IsPortActive(pActInfo, eI_Trigger))
				TriggerPorts(pActInfo);

			if(IsPortActive(pActInfo, eI_Disable))
				UnRegisterEntity();

			if(IsPortActive(pActInfo, eI_Enable))
			{
				UnRegisterEntity();
				m_entityId = GetEntityId(pActInfo);
				RegisterEntity();
			}

			break;
		}
	}
开发者ID:Hellraiser666,项目名称:CryGame,代码行数:27,代码来源:FlowMinimapNodes.cpp


示例7: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
	{
		CPersistantStats* pStats = g_pGame->GetPersistantStats();
		CRY_ASSERT(pStats != NULL);
		if (!pStats)
			return;

		switch (event)
		{
			case eFE_Activate:
			{	
				bool saveProfile = false;
				if (IsPortActive(pActInfo, EIP_FlagTutorialAsPlayed))
				{
					int val = pStats->GetStat( EIPS_TutorialAlreadyPlayed );
					pStats->SetClientStat( EIPS_TutorialAlreadyPlayed, val + 1 );
					saveProfile = true;
				}
				if (IsPortActive(pActInfo, EIP_FlagTutorialAsNOTPlayed))
				{
					pStats->SetClientStat( EIPS_TutorialAlreadyPlayed, 0 );
					saveProfile = true;
				}
				if (IsPortActive(pActInfo, EIP_GetFlagState))
				{
					int val = pStats->GetStat( EIPS_TutorialAlreadyPlayed );
					ActivateOutput( pActInfo, OUT_HasBeenPlayed, val!=0 );
				}
				if (saveProfile)
					g_pGame->GetProfileOptions()->SaveProfile(ePR_All);
			}
			break;
		}
	}
开发者ID:Xydrel,项目名称:Infected,代码行数:34,代码来源:AchievementNode.cpp


示例8: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{	
		case eFE_Initialize:
			{
				m_active = false;
				m_actInfo = *pActInfo;	// Keep a copy of the activation info to be able to use the output ports
#if CRY_PLATFORM_DURANGO				
				// Register listener
				if (gEnv->pSystem->GetIInput()->GetKinectInput())
				{
					gEnv->pSystem->GetIInput()->GetKinectInput()->RegisterKinectAudioListener(this,"CSpeechRecognitionListenerNode"); 
				}
#endif

			}
			break;
		case eFE_Activate:
			{				
				if(IsPortActive(pActInfo,eI_Enable))
				{
					m_active = true;
				}
				if(IsPortActive(pActInfo,eI_Disable))
				{
					m_active = false;
				}
			}
			break;
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:32,代码来源:FlowKinectNodesDurango.cpp


示例9: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{
		case eFE_Activate:
			if (IsPortActive(pActInfo,eIP_Get))
			{
				Vec3 v;
				gEnv->p3DEngine->GetGlobalParameter(E3DPARAM_SKY_MOONROTATION, v);
				ActivateOutput(pActInfo, eOP_Latitude, v.x);
				ActivateOutput(pActInfo, eOP_Longitude, v.y);
			}
			if (IsPortActive(pActInfo, eIP_Set))
			{
				Vec3 v(ZERO);
				v.x = GetPortFloat(pActInfo, eIP_Latitude);
				v.y = GetPortFloat(pActInfo, eIP_Longitude);
				gEnv->p3DEngine->SetGlobalParameter(E3DPARAM_SKY_MOONROTATION, v);
				ActivateOutput(pActInfo, eOP_Latitude, v.x);
				ActivateOutput(pActInfo, eOP_Longitude, v.y);
				bool forceUpdate = GetPortBool( pActInfo, eIP_ForceUpdate );
				ITimeOfDay* pTOD = gEnv->p3DEngine->GetTimeOfDay();
				if (forceUpdate && pTOD )
					pTOD->Update( true, true );
			}
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:27,代码来源:FlowEnvironmentNodes.cpp


示例10: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo * pActInfo )
	{
		switch (event)
		{
		case eFE_Initialize:
			if (gEnv->IsEditor())
				m_bTriggered = false;
			break;
		case eFE_Activate:
			if (m_bTriggered == false)
			{
				for (int i=0; i<6; i++)
				{
					if (IsPortActive(pActInfo, i))
					{
						ActivateOutput(pActInfo, 0, GetPortAny(pActInfo, i));
						m_bTriggered = true;
						break;
					}
				}
			}
			if (IsPortActive(pActInfo, 6))
				m_bTriggered = false;
			break;
		}
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:26,代码来源:FlowLogicNodes.cpp


示例11: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		if (event == eFE_Activate || event == eFE_Initialize)
		{
			if (IsPortActive(pActInfo, INP_ACTIVE))
			{
				bool active = GetPortBool(pActInfo, 0);
				if (active)
					m_pGF->GetIItemSystem()->RegisterListener(this);
				else
					m_pGF->GetIItemSystem()->UnregisterListener(this);
			}
			if (IsPortActive(pActInfo, INP_CHECK))
			{
				IActor* pActor = GetInputActor( pActInfo );
				if (pActor)
				{
					IInventory* pInventory = pActor->GetInventory();
					if (pInventory)
					{
						IEntity* pEntityItem = gEnv->pEntitySystem->GetEntity( pInventory->GetCurrentItem() );
						TriggerOutputs( pActInfo, pEntityItem );
					}
				}
			}
		}
	}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:27,代码来源:FlowInventoryNodes.cpp


示例12: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
	{
		switch (event)
		{
		case eFE_Activate:
			{
				IEntity* pEntity = pActInfo->pEntity;
				if(!pEntity)
					return;

				m_delayResult = GetPortBool(pActInfo, EIP_DelayResult);

				if(IsPortActive(pActInfo, EIP_Enable))
				{
					m_actInfo = *pActInfo;
					m_entityId = pEntity->GetId();
					SetEnabled(true);
				}
				else if(IsPortActive(pActInfo, EIP_Disable))
				{
					SetEnabled(false);
				}
				break;
			}
		}
	}
开发者ID:Xydrel,项目名称:Infected,代码行数:26,代码来源:TacticalScanNode.cpp


示例13: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo)
	{
		switch(event)
		{
		case eFE_Activate:
			CGameRules *pGR = g_pGame->GetGameRules();

			if(!pGR)
				return;

			if(!pActInfo->pEntity)
				return;

			const bool bUseVapor = GetPortBool(pActInfo, EIP_Vapor);

			if(IsPortActive(pActInfo, EIP_Freeze))
			{
				pGR->FreezeEntity(pActInfo->pEntity->GetId(), true, bUseVapor, true);
				ActivateOutput(pActInfo, EOP_Frozen, true);
			}
			else if(IsPortActive(pActInfo, EIP_UnFreeze))
			{
				pGR->FreezeEntity(pActInfo->pEntity->GetId(), false, bUseVapor);
				ActivateOutput(pActInfo, EOP_UnFrozen, true);
			}

			break;
		}
	}
开发者ID:super-nova,项目名称:NovaRepo,代码行数:29,代码来源:FlowHitInfoNode.cpp


示例14: UpdateUIElement

void CFlashUIMCTemplateRemoveNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo )
{
	if (event == eFE_Initialize)
	{
		UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
	}
	else if (event == eFE_Activate)
	{
		if (IsPortActive( pActInfo, eI_UIElement ))
		{
			UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
		}

		if (!UpdateTmplDesc( GetPortString( pActInfo, eI_TemplateInstanceName ), pActInfo ))
			return;

		if (GetElement() && IsPortActive(pActInfo, eI_Remove))
		{
			const int instanceId = GetPortInt( pActInfo, eI_InstanceID );

			SPerInstanceCall1< const SUIMovieClipDesc* > caller;
			caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIMCTemplateRemoveNode::RemoveMoviclip), GetTmplDesc(true), false);

			ActivateOutput( pActInfo, eO_OnRemove, true );
		}
	}

}
开发者ID:joewan,项目名称:pycmake,代码行数:28,代码来源:FlashUIElementNodes.cpp


示例15: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{
		case eFE_Activate:
			{
				IEntity* pEntity = pActInfo->pEntity;
				if (pEntity != 0)
				{
					ENanoMode nanoMode = NANOMODE_LAST;
					if (IsPortActive(pActInfo, EIP_Cloak))
						nanoMode = NANOMODE_CLOAK;
					else if (IsPortActive(pActInfo, EIP_Speed))
						nanoMode = NANOMODE_SPEED;
					else if (IsPortActive(pActInfo, EIP_Strength))
						nanoMode = NANOMODE_STRENGTH;
					else if (IsPortActive(pActInfo, EIP_Defense))
						nanoMode = NANOMODE_DEFENSE;
					if (nanoMode != NANOMODE_LAST)
					{
						const bool bAsian = GetPortBool(pActInfo, EIP_Asian);
						CNanoSuit::SNanoMaterial* pNanoMat = CNanoSuit::GetNanoMaterial(nanoMode, bAsian);
						if (pNanoMat)
						{
							CNanoSuit::AssignNanoMaterialToEntity(pEntity, pNanoMat);
							ActivateOutput(pActInfo, EOP_Done, true);
						}
					}
				}
			}
			break;
		}
	}
开发者ID:mrwonko,项目名称:CrysisVR,代码行数:33,代码来源:FlowNanoSuitNodes.cpp


示例16: switch

//------------------------------------------------------------------------
void CFlowVehicleAttachment::ProcessEvent(EFlowEvent flowEvent, SActivationInfo* pActivationInfo)
{
	CFlowVehicleBase::ProcessEvent(flowEvent, pActivationInfo);

  if (!GetVehicle())
    return;

  switch (flowEvent)
  {
  case eFE_Initialize:
    {
      if (m_attachedId)
      {
        Attach(pActivationInfo, false);
      }
      break;
    }
  case eFE_Activate:
    {            
      if ( IsPortActive(pActivationInfo, IN_DETACH) )
      {
        Attach(pActivationInfo, false);
      }
      else if ( IsPortActive(pActivationInfo, IN_ATTACH) )
      {
        Attach(pActivationInfo, true);
      }      
      break;
    }        
  }
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:32,代码来源:FlowVehicleAttachment.cpp


示例17: ProcessEvent

	virtual void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		switch (event)
		{
			case eFE_Initialize:
			{
				UpdateListenerStatus( pActInfo );
				m_actInfo = *pActInfo;
				ReadFactionFromInp( pActInfo );
				break;
			}

			case eFE_Activate:
			{
				if (IsPortActive( pActInfo, IN_FACTION ))
					ReadFactionFromInp( pActInfo );

				if (IsPortActive(pActInfo, IN_ENABLED))
				{
					UpdateListenerStatus( pActInfo ); // this will automatically cause an AlertnessChanged() call from the AiCounters, so we dont need to manually update in this case
				}

				if (IsPortActive(pActInfo, IN_CHECK))
				{
					UpdateOutputs( g_pGame->GetGameAISystem()->GetAICounters().GetAlertnessCounter().GetAlertnessGlobal() );
				}
				break;
			}
		}
	}
开发者ID:PiratesAhoy,项目名称:HeartsOfOak-Core,代码行数:30,代码来源:AINodes.cpp


示例18: switch

void CFlashUIElementInstanceNode::ProcessEvent( EFlowEvent event,SActivationInfo* pActInfo )
{
	switch (event)
	{
	case eFE_Initialize:
		pActInfo->pGraph->SetRegularlyUpdated(pActInfo->myID, true);
		m_events.clear();
		m_events.init( pActInfo->pGraph );
		if (GetElement()) GetElement()->RemoveEventListener(this);
		UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
		if (GetElement()) GetElement()->AddEventListener(this, "CFlashUIElementInstanceNode");
		break;
	case eFE_Activate:
		if (IsPortActive( pActInfo, eI_InstanceID ) || IsPortActive( pActInfo, eI_UIElement ))
		{
			if (GetElement()) GetElement()->RemoveEventListener(this);
			UpdateUIElement( GetPortString( pActInfo, eI_UIElement ), pActInfo );
			if (GetElement()) GetElement()->AddEventListener(this, "CFlashUIElementInstanceNode");
		}
		if (IsPortActive( pActInfo, eI_DestroyInstance ))
		{
			const int         instanceId = GetPortInt(pActInfo, eI_InstanceID);
			SPerInstanceCall0 caller;
			caller.Execute(GetElement(), instanceId, functor(*this, &CFlashUIElementInstanceNode::DestroyInstance));
		}
		break;
	case eFE_Update:
		FlushNextEvent(pActInfo);
		break;
	}
}
开发者ID:joewan,项目名称:pycmake,代码行数:31,代码来源:FlashUIElementNodes.cpp


示例19: ProcessEvent

	virtual void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo)
	{
		switch (event)
		{
		case eFE_Activate:
			{
				if (IsPortActive(pActInfo, eIP_Load) || IsPortActive(pActInfo, eIP_Save))
				{
					IPlayerProfile* pProfile = NULL;
					if (IPlayerProfileManager* pProfileMan = gEnv->pGame->GetIGameFramework()->GetIPlayerProfileManager())
					{
						const char* user = pProfileMan->GetCurrentUser();
						pProfile = pProfileMan->GetCurrentProfile(user);
						
						if (!pProfile)
							break;
						
						if (IsPortActive(pActInfo, eIP_Save))
						{
							pProfileMan->SaveOnlineAttributes(pProfile);
						}
						else
						{
							pProfileMan->LoadOnlineAttributes(pProfile);
						}

						ActivateOutput(pActInfo, eOP_Done, 1);
					}
				}
			}
			break;
		}
	}
开发者ID:aronarts,项目名称:FireNET,代码行数:33,代码来源:FlowOnlineStatsNodes.cpp


示例20: ProcessEvent

	void ProcessEvent( EFlowEvent event, SActivationInfo *pActInfo )
	{
		if(eFE_Activate == event)
		{
			const bool bAttach = IsPortActive(pActInfo, EIP_ATTACH);
			const bool bDetach = IsPortActive(pActInfo, EIP_DETACH);
			if (!bAttach && !bDetach)
				return;

			IActor* pActor = GetActor(pActInfo);
			if (pActor == 0)
				return;

			const string& className = GetPortString(pActInfo, EIP_WEAPON);

			CWeapon* pWeapon = static_cast<CWeapon*> ( className.empty() ? GetWeapon(pActor) : GetWeapon(pActor, className.c_str()) );
			if (pWeapon != 0)
			{
				ItemString acc = ItemString(GetPortString(pActInfo, EIP_ACCESSORY));
				if (bAttach && pWeapon->GetAccessory(acc) == 0)
				{
					pWeapon->SwitchAccessory(acc);
					ActivateOutput(pActInfo, EOP_ATTACHED, true);
				}
				else if (bDetach && pWeapon->GetAccessory(acc) != 0)
				{
					pWeapon->SwitchAccessory(acc);
					ActivateOutput(pActInfo, EOP_DETACHED, true);
				}
			}
		}
	}
开发者ID:RenEvo,项目名称:dead6,代码行数:32,代码来源:WeaponNodes.cpp



注:本文中的IsPortActive函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsPositionValid函数代码示例发布时间:2022-05-30
下一篇:
C++ IsPlaying函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap