Jump to content

iSouli

Member
  • Posts

    7
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by iSouli

  1. On 9/9/2019 at 10:10 AM, Rafiloni said:
     
    
    hello I have a problem with the system. A compilation of the effective treatment course selectmodel interrupts the client.
    
    void CRenderTarget::SelectModel(const DWORD index)
    {
    	if (index == 0)
    	{
    		//delete m_pModel;
    		m_pModel.reset();
    		return;
    	}
    
    	CInstanceBase::SCreateData kCreateData{};
    
    
    	kCreateData.m_bType = CActorInstance::TYPE_NPC; // Dynamic Type
    	kCreateData.m_dwRace = index;
    	
    	auto model = std::make_unique<CInstanceBase>();
    	if (!model->Create(kCreateData))
    	{
    		if (m_pModel)
    		{
    			m_pModel.reset();
    		}
    		return;
    	}
    	m_pModel = std::move(model);
    
    	m_pModel->GetGraphicThingInstancePtr()->ClearAttachingEffect();
    	m_modelRotation = 0.0f;
    	m_pModel->Refresh(CRaceMotionData::NAME_WAIT, true);
    	m_pModel->SetLoopMotion(CRaceMotionData::NAME_WAIT);
    	m_pModel->SetAlwaysRender(true);
    	m_pModel->SetRotation(0.0f);
    
    	auto& camera_manager = CCameraManager::instance();
    	camera_manager.SetCurrentCamera(CCameraManager::SHOPDECO_CAMERA);
    	camera_manager.GetCurrentCamera()->SetTargetHeight(110.0);
    	camera_manager.ResetToPreviousCamera();
    }
    
    after function tests
    
    kCreateData.m_bType = CActorInstance::TYPE_NPC; // Dynamic Type
    	kCreateData.m_dwRace = index;
    	
    	auto model = std::make_unique<CInstanceBase>();
    	TraceError("OK"); //displays ok
    	if (!model->Create(kCreateData))
    	{
    		TraceError("OK"); //does not display
    		if (m_pModel)
    		{
    			m_pModel.reset();
    		}
    		return;
    	}
    	TraceError("OK"); //does not display
    
    the error closes the client without syser and log errors. Compiles distriubute. Please help.

    I have the same problem, I can't do make_unique from the cinstancebase. The function runs through but then the client closes.

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.