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

C++ IsGameTypeSingle函数代码示例

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

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



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

示例1: R_ASSERT

bool CMapLocation::Update() //returns actual
{
	R_ASSERT(m_cached.m_updatedFrame!=Device.dwFrame);
		

	if(	m_flags.test(eTTL) )
	{
		if( m_actual_time < Device.dwTimeGlobal)
		{
			m_cached.m_Actuality		= false;
			m_cached.m_updatedFrame		= Device.dwFrame;
			return						m_cached.m_Actuality;
		}
	}

	CObject* pObject					= Level().Objects.net_Find(m_objectID);
	
	if (m_owner_se_object || (!IsGameTypeSingle() && pObject) )
	{
		m_cached.m_Actuality			= true;
		if(IsGameTypeSingle())
			CalcLevelName				();

		CalcPosition					();
	}else
		m_cached.m_Actuality			= false;

	m_cached.m_updatedFrame				= Device.dwFrame;
	return								m_cached.m_Actuality;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:30,代码来源:map_location.cpp


示例2: UpdateHUDAddonsVisibility

void CWeapon::UpdateCL		()
{
	inherited::UpdateCL		();
	UpdateHUDAddonsVisibility();
	//подсветка от выстрела
	UpdateLight				();

	//нарисовать партиклы
	UpdateFlameParticles	();
	UpdateFlameParticles2	();

	if(!IsGameTypeSingle())
		make_Interpolation		();
	
	if( (GetNextState()==GetState()) && IsGameTypeSingle() && H_Parent()==Level().CurrentEntity())
	{
		CActor* pActor	= smart_cast<CActor*>(H_Parent());
		if(pActor && !pActor->AnyMove() && this==pActor->inventory().ActiveItem())
		{
			if (hud_adj_mode==0 && 
				GetState()==eIdle && 
				(Device.dwTimeGlobal-m_dw_curr_substate_time>20000) && 
				!IsZoomed()&&
				g_player_hud->attached_item(1)==NULL)
			{
				if(AllowBore())
					SwitchState		(eBore);

				ResetSubStateTime	();
			}
		}
	}

	if(m_zoom_params.m_pNight_vision && !need_renderable())
	{
		if(!m_zoom_params.m_pNight_vision->IsActive())
		{
			CActor *pA = smart_cast<CActor *>(H_Parent());
			R_ASSERT(pA);
			CTorch* pTorch = smart_cast<CTorch*>( pA->inventory().ItemFromSlot(TORCH_SLOT) );
			if ( pTorch && pTorch->GetNightVisionStatus() )
			{
				m_bRememberActorNVisnStatus = pTorch->GetNightVisionStatus();
				pTorch->SwitchNightVision(false, false);
			}
			m_zoom_params.m_pNight_vision->Start(m_zoom_params.m_sUseZoomPostprocess, pA, false);
		}

	}
	else if(m_bRememberActorNVisnStatus)
	{
		m_bRememberActorNVisnStatus = false;
		EnableActorNVisnAfterZoom();
	}

	if(m_zoom_params.m_pVision)
		m_zoom_params.m_pVision->Update();
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:58,代码来源:Weapon.cpp


示例3: Die

void CEntity::Die(CObject* who)
{
	if (!AlreadyDie()) set_death_time();
	set_ready_to_save	();
	SetfHealth			(-1.f);

	if(IsGameTypeSingle())
	{
		VERIFY				(m_registered_member);
	}
	m_registered_member	= false;
	if (IsGameTypeSingle())
		Level().seniority_holder().team(g_Team()).squad(g_Squad()).group(g_Group()).unregister_member(this);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:14,代码来源:Entity.cpp


示例4: UpdateGrenadeVisibility

BOOL CWeaponMagazinedWGrenade::net_Spawn(CSE_Abstract* DC) 
{
	CSE_ALifeItemWeapon* const weapon		= smart_cast<CSE_ALifeItemWeapon*>(DC);
	R_ASSERT								(weapon);
	if ( IsGameTypeSingle() )
	{
		inherited::net_Spawn_install_upgrades	(weapon->m_upgrades);
	}

	BOOL l_res = inherited::net_Spawn(DC);
	 
	UpdateGrenadeVisibility(!!iAmmoElapsed);
	SetPending			(FALSE);

	iAmmoElapsed2	= weapon->a_elapsed_grenades.grenades_count;
	m_ammoType2		= weapon->a_elapsed_grenades.grenades_type;

	m_DefaultCartridge2.Load(*m_ammoTypes2[m_ammoType2], u8(m_ammoType2));
	
	if (!IsGameTypeSingle())
	{
		if (!m_bGrenadeMode && IsGrenadeLauncherAttached() && !getRocketCount() && iAmmoElapsed2)
		{
			m_magazine2.push_back(m_DefaultCartridge2);

			shared_str grenade_name = m_DefaultCartridge2.m_ammoSect;
			shared_str fake_grenade_name = pSettings->r_string(grenade_name, "fake_grenade_name");

			CRocketLauncher::SpawnRocket(*fake_grenade_name, this);
		}
	}else
	{
		xr_vector<CCartridge>* pM = NULL;
		bool b_if_grenade_mode	= (m_bGrenadeMode && iAmmoElapsed && !getRocketCount());
		if(b_if_grenade_mode)
			pM = &m_magazine;
			
		bool b_if_simple_mode	= (!m_bGrenadeMode && m_magazine2.size() && !getRocketCount());
		if(b_if_simple_mode)
			pM = &m_magazine2;

		if(b_if_grenade_mode || b_if_simple_mode) 
		{
			shared_str fake_grenade_name = pSettings->r_string(pM->back().m_ammoSect, "fake_grenade_name");
			
			CRocketLauncher::SpawnRocket(*fake_grenade_name, this);
		}
	}
	return l_res;
}
开发者ID:2asoft,项目名称:xray,代码行数:50,代码来源:WeaponMagazinedWGrenade.cpp


示例5: PickupModeUpdate

void CActor::PickupModeUpdate()
{
	if(!m_bPickupMode)				return; // kUSE key pressed
	if(!IsGameTypeSingle())			return;

	//подбирание объекта
	if(	m_pObjectWeLookingAt									&& 
		m_pObjectWeLookingAt->cast_inventory_item()				&& 
		m_pObjectWeLookingAt->cast_inventory_item()->Useful()	&&
		m_pUsableObject											&& 
		!m_pUsableObject->nonscript_usable()					&&
		!Level().m_feel_deny.is_object_denied(m_pObjectWeLookingAt) )
	{
		m_pUsableObject->use(this);
		Game().SendPickUpEvent(ID(), m_pObjectWeLookingAt->ID());
	}

	feel_touch_update	(Position(), m_fPickupInfoRadius);
	
	CFrustum frustum;
	frustum.CreateFromMatrix(Device.mFullTransform, FRUSTUM_P_LRTB|FRUSTUM_P_FAR);

	for(xr_vector<CObject*>::iterator it = feel_touch.begin(); it != feel_touch.end(); it++)
	{
		if (CanPickItem(frustum, Device.vCameraPosition, *it)) 
			PickupInfoDraw(*it);
	}
}
开发者ID:zcaliptium,项目名称:xray-16,代码行数:28,代码来源:Actor_Feel.cpp


示例6: activate_physic_shell

void CPhysicsShellHolder::activate_physic_shell()
{
	VERIFY						(!m_pPhysicsShell);
	create_physic_shell			();
	Fvector						l_fw, l_up;
	l_fw.set					(XFORM().k);
	l_up.set					(XFORM().j);
	l_fw.mul					(2.f);
	l_up.mul					(2.f);

	Fmatrix						l_p1, l_p2;
	l_p1.set					(XFORM());
	l_p2.set					(XFORM());
	l_fw.mul					(2.f);
	l_p2.c.add					(l_fw);

	m_pPhysicsShell->Activate	(l_p1, 0, l_p2);
	if(H_Parent()&&H_Parent()->Visual())
	{
		smart_cast<CKinematics*>(H_Parent()->Visual())->CalculateBones_Invalidate	();
		smart_cast<CKinematics*>(H_Parent()->Visual())->CalculateBones	();
	}
	smart_cast<CKinematics*>(Visual())->CalculateBones_Invalidate	();
	smart_cast<CKinematics*>(Visual())->CalculateBones();
	if(!IsGameTypeSingle())
	{
		if(!smart_cast<CCustomRocket*>(this)&&!smart_cast<CGrenade*>(this)) PPhysicsShell()->SetIgnoreDynamic();
	}
//	XFORM().set					(l_p1);
	correct_spawn_pos();

m_pPhysicsShell->set_LinearVel(l_fw);
	m_pPhysicsShell->GetGlobalTransformDynamic(&XFORM());
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:34,代码来源:PhysicsShellHolder.cpp


示例7: InitFromXml

void CUIWpnParams::InitFromXml(CUIXml& xml_doc)
{
	if (!xml_doc.NavigateToNode("wpn_params", 0))	return;
	CUIXmlInit::InitWindow			(xml_doc, "wpn_params", 0, this);
	CUIXmlInit::InitStatic			(xml_doc, "wpn_params:prop_line",			0, &m_Prop_line);

	CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_accuracy",		0, &m_icon_acc);
	CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_damage",		0, &m_icon_dam);
	CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_handling",		0, &m_icon_han);
	CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_rpm",			0, &m_icon_rpm);

	CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_accuracy",		0, &m_textAccuracy);
	CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_damage",			0, &m_textDamage);
	CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_handling",		0, &m_textHandling);
	CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_rpm",				0, &m_textRPM);

	m_progressAccuracy.InitFromXml	( xml_doc, "wpn_params:progress_accuracy" );
	m_progressDamage.InitFromXml	( xml_doc, "wpn_params:progress_damage" );
	m_progressHandling.InitFromXml	( xml_doc, "wpn_params:progress_handling" );
	m_progressRPM.InitFromXml		( xml_doc, "wpn_params:progress_rpm" );

	if(IsGameTypeSingle())
	{
		CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_ammo",			0, &m_stAmmo);
		CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_ammo_count",		0, &m_textAmmoCount);
		CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_ammo_count2",		0, &m_textAmmoCount2);
		CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_ammo_types",		0, &m_textAmmoTypes);
		CUIXmlInit::InitTextWnd			(xml_doc, "wpn_params:cap_ammo_used_type",	0, &m_textAmmoUsedType);
		CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_ammo_type1",	0, &m_stAmmoType1);
		CUIXmlInit::InitStatic			(xml_doc, "wpn_params:static_ammo_type2",	0, &m_stAmmoType2);
	}

}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:33,代码来源:UIWpnParams.cpp


示例8: operator

void game_sv_GameState::Update		()
{
	struct ping_filler
	{
		void operator()(IClient* client)
		{
			xrClientData*	C			= static_cast<xrClientData*>(client);
			if (!C->ps)
				return;
			C->ps->ping					= u16(C->stats.getPing());
		}
	};
	ping_filler tmp_functor;
	m_server->ForEachClientDo(tmp_functor);
	
	if (!IsGameTypeSingle() && (Phase() == GAME_PHASE_INPROGRESS))
	{
		m_item_respawner.update(Level().timeServer());
	}
	
	if (!g_dedicated_server)
	{
		if (Level().game) {
			CScriptProcess				*script_process = ai().script_engine().script_process(ScriptEngine::eScriptProcessorGame);
			if (script_process)
				script_process->update	();
		}
	}
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:29,代码来源:game_sv_base.cpp


示例9: UpdateCL

void CPhysicObject::UpdateCL()
{
	inherited::UpdateCL();

	//Если наш физический объект анимированный, то 
	//двигаем объект за анимацией
	if (m_pPhysicsShell->PPhysicsShellAnimator())
	{
		m_pPhysicsShell->AnimatorOnFrame();
	}
	
	if (!IsGameTypeSingle())
	{
		Interpolate();
	}

	m_anim_script_callback.update( *this );
	PHObjectPositionUpdate();

#ifdef	DEBUG
if(dbg_draw_doors)
{
	Fvector c,o;
	get_door_vectors( c, o );
}
#endif

	if( !is_active( bones_snd_player ) )
		return;
	bones_snd_player->update( Device.fTimeDelta, *this );

}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:32,代码来源:PhysicObject.cpp


示例10: Destroy

void CPHDestroyable::Destroy(u16 source_id/*=u16(-1)*/,LPCSTR section/*="ph_skeleton_object"*/)
{
	
	if(!CanDestroy())return ;
	m_notificate_objects.clear();
	CPhysicsShellHolder	*obj	=PPhysicsShellHolder()		;
	CPHSkeleton *phs= obj->PHSkeleton();
	if(phs)phs->SetNotNeedSave();
	if(obj->PPhysicsShell())	obj->PPhysicsShell()->Enable()	;
	obj->processing_activate();
	if(source_id==obj->ID())
	{
		m_flags.set(fl_released,FALSE);
	}
	xr_vector<shared_str>::iterator i=m_destroyed_obj_visual_names.begin(),e=m_destroyed_obj_visual_names.end();

	if (IsGameTypeSingle())
	{
		for(;e!=i;i++)
			GenSpawnReplace(source_id,section,*i);
	};	
///////////////////////////////////////////////////////////////////////////
	m_flags.set(fl_destroyed,TRUE);
	return;
}
开发者ID:2asoft,项目名称:xray,代码行数:25,代码来源:PHDestroyable.cpp


示例11: Fvector

bool	CTeleWhirlwindObject::destroy_object		(const Fvector dir,float val) 
{
	CPHDestroyable* D=object->ph_destroyable();
	if(D)
	{
		D->PhysicallyRemoveSelf();
		D->Destroy(m_telekinesis->OwnerObject()->ID());
		
//.		m_telekinesis->add_impact(dir,val*10.f);

		xr_vector<shared_str>::iterator i = D->m_destroyed_obj_visual_names.begin();
		xr_vector<shared_str>::iterator e = D->m_destroyed_obj_visual_names.end();
		if (IsGameTypeSingle())
		{
			for(;e!=i;i++)
				m_telekinesis->add_impact(dir,val*10.f);
		};	


		CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(object);
		if(PP)
		{
			u16 root=(smart_cast<IKinematics*>(object->Visual()))->LL_GetBoneRoot();
			PP->StartParticles(m_telekinesis->destroing_particles(),root, Fvector().set(0,1,0),m_telekinesis->OwnerObject()->ID());
		}
		return true;
	}
	return false;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:29,代码来源:TeleWhirlwind.cpp


示例12: ai

CMapLocation::CMapLocation(LPCSTR type, u16 object_id)
{
	m_flags.zero			();

	m_level_spot			= NULL;
	m_level_spot_pointer	= NULL;
	m_minimap_spot			= NULL;
	m_minimap_spot_pointer	= NULL;
	m_complex_spot			= NULL;
	m_complex_spot_pointer	= NULL;

	m_level_map_spot_border	= NULL;
	m_mini_map_spot_border	= NULL;
	m_complex_spot_border	= NULL;

	m_level_map_spot_border_na = NULL;
	m_mini_map_spot_border_na = NULL;
	m_complex_spot_border_na = NULL;

	m_objectID				= object_id;
	m_actual_time			= 0;
	m_owner_se_object		= (ai().get_alife()) ? ai().alife().objects().object(m_objectID,true) : NULL;
	m_flags.set				(eHintEnabled, TRUE);
	LoadSpot				(type, false);
	
	DisablePointer			();

	EnableSpot				();
	m_cached.m_Position.set	(10000,10000);
	m_cached.m_updatedFrame = u32(-1);
	m_cached.m_graphID		= GameGraph::_GRAPH_ID(-1);
	if(!IsGameTypeSingle())
		m_cached.m_LevelName = Level().name();
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,代码来源:map_location.cpp


示例13: AddDelayedEvent

void game_sv_GameState::AddDelayedEvent(NET_Packet &tNetPacket, u16 type, u32 time, ClientID sender )
{
//	OnEvent(tNetPacket,type,time,sender);
	if (IsGameTypeSingle())
	{
		m_event_queue->Create(tNetPacket,type,time,sender);
		return;
	}
	switch (type)
	{
	case GAME_EVENT_PLAYER_STARTED:
	case GAME_EVENT_PLAYER_READY:
	case GAME_EVENT_VOTE_START:
	case GAME_EVENT_VOTE_YES:
	case GAME_EVENT_VOTE_NO:
	case GAME_EVENT_PLAYER_AUTH:
	case GAME_EVENT_CREATE_PLAYER_STATE:
		{
			m_event_queue->Create(tNetPacket,type,time,sender);
		}break;
	default:
		{
			m_event_queue->CreateSafe(tNetPacket,type,time,sender);
		}break;
	}
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:game_sv_base.cpp


示例14: object

void CInventoryItem::net_Export			(NET_Packet& P) 
{	
	P.w_float			(m_fCondition);
	P.w_u32				(Level().timeServer());	
	///////////////////////////////////////
	CPHSynchronize* pSyncObj				= NULL;
	SPHNetState	State;
	pSyncObj = object().PHGetSyncItem		(0);
	if (pSyncObj && !object().H_Parent()) 
		pSyncObj->get_State(State);
	else 	
		State.position.set(object().Position());
	///////////////////////////////////////	
	u16 NumItems = object().PHGetSyncItemsNumber();
	if (object().H_Parent())
		NumItems = CSE_ALifeInventoryItem::FLAG_NO_POSITION;
	else
		if (IsGameTypeSingle())
						NumItems = 0;

	P.w_u16					( NumItems		);
	if (NumItems != CSE_ALifeInventoryItem::FLAG_NO_POSITION)
		P.w_vec3			( State.position);

	if (!NumItems || (NumItems == CSE_ALifeInventoryItem::FLAG_NO_POSITION))
		return;
	position_Export(P,State);
};
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:28,代码来源:inventory_item.cpp


示例15: Level

void CUIZoneMap::Update()
{
	CActor* pActor = smart_cast<CActor*>( Level().CurrentViewEntity() );
	if ( !pActor ) return;

	if ( !( Device.dwFrame % 20 ) && IsGameTypeSingle() )
	{
		string16	text_str;
		xr_strcpy( text_str, sizeof(text_str), "" );

		CPda* pda = pActor->GetPDA();
		if ( pda )
		{
			u32 cn = pda->ActiveContactsNum();
			if ( cn > 0 )
			{
				xr_sprintf( text_str, sizeof(text_str), "%d", cn );
			}
		}
		m_Counter_text.SetText( text_str );
	}

	UpdateRadar( Device.vCameraPosition );
	float h, p;
	Device.vCameraDirection.getHP( h, p );
	SetHeading( -h );

	m_clock_wnd->TextItemControl()->SetText( InventoryUtilities::GetGameTimeAsString( InventoryUtilities::etpTimeToMinutes ).c_str() );
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:29,代码来源:UIZoneMap.cpp


示例16: AttachChild

void CUIMessagesWindow::Init(float x, float y, float width, float height){

	CUIXml		 xml;
	u32			color;
	CGameFont*	pFont;

	xml.Init(CONFIG_PATH, UI_PATH, "messages_window.xml");

	m_pGameLog = xr_new<CUIGameLog>();m_pGameLog->SetAutoDelete(true);
	m_pGameLog->Show(true);
	AttachChild(m_pGameLog);
	if ( IsGameTypeSingle() )
	{
		CUIXmlInit::InitScrollView(xml, "sp_log_list", 0, m_pGameLog);
	}
	else
	{
		m_pChatLog			= xr_new<CUIGameLog>(); m_pChatLog->SetAutoDelete(true);
		m_pChatLog->Show	(true);
		AttachChild			(m_pChatLog);
		m_pChatWnd			= xr_new<CUIChatWnd>(m_pChatLog); m_pChatWnd->SetAutoDelete(true);
		AttachChild			(m_pChatWnd);

		CUIXmlInit::InitScrollView(xml, "mp_log_list", 0, m_pGameLog);
		CUIXmlInit::InitFont(xml, "mp_log_list:font", 0, color, pFont);
		m_pGameLog->SetTextAtrib(pFont, color);

		CUIXmlInit::InitScrollView(xml, "chat_log_list", 0, m_pChatLog);
		CUIXmlInit::InitFont(xml, "chat_log_list:font", 0, color, pFont);
		m_pChatLog->SetTextAtrib(pFont, color);
		
		m_pChatWnd->Init	(xml);
	}	

}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:35,代码来源:UIMessagesWindow.cpp


示例17: UpdateActor

void CUIActorMenu::UpdateActor()
{
	if ( IsGameTypeSingle() )
	{
		string64 buf;
		sprintf_s( buf, "%d RU", m_pActorInvOwner->get_money() );
		m_ActorMoney->SetText( buf );
	}
	else
	{
		UpdateActorMP();
	}
	
	CActor* actor = smart_cast<CActor*>( m_pActorInvOwner );
	if ( actor )
	{
		CWeapon* wp = smart_cast<CWeapon*>( actor->inventory().ActiveItem() );
		if ( wp ) 
		{
			wp->ForceUpdateAmmo();
		}
	}//actor

	InventoryUtilities::UpdateWeightStr( *m_ActorWeight, *m_ActorWeightMax, m_pActorInvOwner );
	
	m_ActorWeight->AdjustWidthToText();
	m_ActorWeightMax->AdjustWidthToText();
	m_ActorBottomInfo->AdjustWidthToText();

	Fvector2 pos = m_ActorWeight->GetWndPos();
	pos.x = m_ActorWeightMax->GetWndPos().x - m_ActorWeight->GetWndSize().x - 5.0f;
	m_ActorWeight->SetWndPos( pos );
	pos.x = pos.x - m_ActorBottomInfo->GetWndSize().x - 5.0f;
	m_ActorBottomInfo->SetWndPos( pos );
}
开发者ID:2asoft,项目名称:xray,代码行数:35,代码来源:UIActorMenuTrade.cpp


示例18: GetHeight

void CUIOutfitDragDropList::SetOutfit(CUICellItem* itm)
{
	m_background->SetWndPos				(Fvector2().set(0,0));
	m_background->SetWndSize			(Fvector2().set(GetWidth(), GetHeight()));
	
	m_background->SetStretchTexture		(true);


	if ((!IsGameTypeSingle()) && !itm)
	{
		CObject *pActor = NULL;

        pActor = smart_cast<CActor*>(Level().CurrentEntity());

		xr_string a;
		if (pActor)
			a = *pActor->cNameVisual();
		else
			a = *m_default_outfit;

		xr_string::iterator it = std::find(a.rbegin(), a.rend(), '\\').base(); 

		// Cut leading full path
		if (it != a.begin())
			a.erase(a.begin(), it);
		// Cut trailing ".ogf"
		R_ASSERT(xr_strlen(a.c_str()) > 4);
		if ('.' == a[a.size() - 4])
			a.erase(a.size() - 4);

		m_background->InitTexture(a.c_str());
	}
	else {
		if(itm)
		{
			PIItem _iitem	= (PIItem)itm->m_pData;
			CCustomOutfit* pOutfit = smart_cast<CCustomOutfit*>(_iitem); VERIFY(pOutfit);
			/*
			r.lt			= pOutfit->GetIconPos();
			r.x1			*= ICON_GRID_WIDTH;
			r.y1			*= ICON_GRID_HEIGHT;
			*/
			m_background->InitTexture			(pOutfit->GetFullIconName().c_str());
		}else
		{
			m_background->InitTexture		("npc_icon_without_outfit");
		}
		/*
		r.x2			= r.x1+CHAR_ICON_FULL_WIDTH*ICON_GRID_WIDTH;
		r.y2			= r.y1+CHAR_ICON_FULL_HEIGHT*ICON_GRID_HEIGHT;

		m_background->SetShader				(InventoryUtilities::GetCharIconsShader());
        m_background->SetOriginalRect		(r);
		*/
	}

	m_background->TextureOn				();
//	m_background->RescaleRelative2Rect	(r);
}
开发者ID:2asoft,项目名称:xray,代码行数:59,代码来源:UIOutfitSlot.cpp


示例19: net_Spawn

BOOL CCustomOutfit::net_Spawn(CSE_Abstract* DC)
{
	if(IsGameTypeSingle())
		ReloadBonesProtection();

	BOOL res = inherited::net_Spawn(DC);
	return					(res);
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:8,代码来源:CustomOutfit.cpp


示例20: CalcMotionSpeed

float CalcMotionSpeed(const shared_str& anim_name)
{

	if(!IsGameTypeSingle() && (anim_name=="anm_show" || anim_name=="anm_hide") )
		return 2.0f;
	else
		return 1.0f;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:8,代码来源:player_hud.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IsHeroic函数代码示例发布时间:2022-05-30
下一篇:
C++ IsGameObjectValid函数代码示例发布时间: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