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.