Пример #1
0
bool EDetailManager::Initialize()
{
	if (m_SnapObjects.empty()){
    	ELog.DlgMsg(mtError,"Snap list empty!");
    	return false;
    }
	if (!m_Base.Valid()){
    	ELog.DlgMsg(mtError,"Base texture empty!");
    	return false;
    }				
    if (!UpdateHeader())                return false;
    m_Base.CreateRMFromObjects			(m_BBox,m_SnapObjects);
    if (!UpdateSlots()) 		   		return false;
    if (!objects.empty()&&!UpdateObjects(false,false))	return false;
	return true;
}
Пример #2
0
//-----------------------------------------------------------------------------
// Purpose: Remove players on the local client
//-----------------------------------------------------------------------------
void CSession::RemoveLocal( const CClientInfo *pClient )
{
	uint  nUserIndex[MAX_PLAYERS_PER_CLIENT] = {0};

	for( int i = 0; i < pClient->m_cPlayers; ++i )
	{
		nUserIndex[i] = pClient->m_iControllers[i];
	}

	// X360TBD: Make async?
	uint ret = g_pXboxSystem->SessionLeaveLocal( m_hSession, pClient->m_cPlayers, nUserIndex, false );
	if ( ret != ERROR_SUCCESS )
	{
		// Handle error
		Warning( "Failed to remove local players\n" );
	}
	else
	{
		UpdateSlots( pClient, false );
	}
}
Пример #3
0
//-----------------------------------------------------------------------------
// Purpose: Remove players on a remote client
//-----------------------------------------------------------------------------
void CSession::RemoveRemote( const CClientInfo *pClient )
{
	XUID  xuids[MAX_PLAYERS_PER_CLIENT] = {0};

	for( int i = 0; i < pClient->m_cPlayers; ++i )
	{
		xuids[i] = pClient->m_xuids[i];
	}

	// X360TBD: Make async?
	uint ret = g_pXboxSystem->SessionLeaveRemote( m_hSession, pClient->m_cPlayers, xuids, false );
	if ( ret != ERROR_SUCCESS )
	{
		// Handle error
		Warning( "Failed to remove remote players\n" );
	}
	else
	{
		UpdateSlots( pClient, false );
	}
}
Пример #4
0
//-----------------------------------------------------------------------------
// Purpose: Join players on a remote client
//-----------------------------------------------------------------------------
void CSession::JoinRemote( const CClientInfo *pClient )
{
	XUID  xuids[MAX_PLAYERS_PER_CLIENT] = {0};
	bool  bPrivate[MAX_PLAYERS_PER_CLIENT] = {0};

	for( int i = 0; i < pClient->m_cPlayers; ++i )
	{
		xuids[i] = pClient->m_xuids[i];
		bPrivate[i] = pClient->m_bInvited;
	}

	// X360TBD: Make async?
	uint ret = g_pXboxSystem->SessionJoinRemote( m_hSession, pClient->m_cPlayers, xuids, bPrivate, false );
	if ( ret != ERROR_SUCCESS )
	{
		// Handle error
		Warning( "Join Remote Error\n" );
	}
	else
	{
		UpdateSlots( pClient, true );
	}
}