[fix] DO_ReleasePatch

This commit is contained in:
kimnuri
2026-01-07 15:37:31 +09:00
parent 77a21a11a9
commit 0817b236e9
5 changed files with 28 additions and 7 deletions
+1 -1
View File
@@ -3772,7 +3772,7 @@ HRESULT CLoader::Loading_For_Field()
/* For.Prototype_Component_DecalBox */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_DecalBox"),
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/Decal/DecalBox.fbx", XMMatrixIdentity()))))
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Effect/Decal/DecalBox.bin", XMMatrixIdentity()))))
return E_FAIL;
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
@@ -207,8 +207,10 @@ void CMapElement_Interactable::OnCollision(CGameObject* pOther, void* pDesc)
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(0.f, -999.f, 0.f, 1.f));
m_pInfoInstance->Deregist_ActiveInteractive(this);
}
else
else{
m_pInfoInstance->Deregist_ActiveInteractive(this);
Set_Dead();
}
}
HRESULT CMapElement_Interactable::Ready_Components(void* pArg)
@@ -492,11 +494,12 @@ void CMapElement_Interactable::Free()
SAFE_RELEASE(m_pShaderCom);
SAFE_RELEASE(m_pEffectPool);
if (nullptr != m_pInfoInstance) {
CInfoInstance* pInfo = m_pInfoInstance;
m_pInfoInstance = nullptr;
pInfo->Deregist_ActiveInteractive(this);
if (!m_isPooled) {
if (nullptr != m_pInfoInstance) {
m_pInfoInstance = nullptr;
}
}
for (auto& pModel : m_pModelComs){
SAFE_RELEASE(pModel);
}
@@ -1068,6 +1068,7 @@ void CPlayer::Behavior_CombatEnter()
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second);
SAFE_RELEASE(m_pGrapInteractive);
m_pGrapInteractive = m_LockOnInfo.pInteractive;
SAFE_ADDREF(m_pGrapInteractive);
m_pGrapInteractive->Set_KinematicFlag(true);
@@ -1123,6 +1124,7 @@ HRESULT CPlayer::Behavior_CombatExitCheck()
if (nullptr != m_LockOnInfo.pInteractive) {
m_pFSM->Enable_State(FSMSTATE::ANCIENT_THROW);
pairAnimInfo = m_Animation[STATEANIM::ANCIENT_THROW];
SAFE_RELEASE(m_pGrapInteractive);
m_pGrapInteractive = m_LockOnInfo.pInteractive;
SAFE_ADDREF(m_pGrapInteractive);
m_pGrapInteractive->Set_KinematicFlag(true);
@@ -527,6 +527,7 @@ PSX::PxHeightField* CPhysX_Manager::Find_HeightField(const _tchar* pFieldName, _
void CPhysX_Manager::Update_Kinematic()
{
list<PSX::PxActor*> ReleasedList = {};
for (_uint iLevel = 0; iLevel < m_iMaxLevel; ++iLevel) {
for (auto& pBody : m_pActiveBodys[iLevel]) {
PSX::PxRigidDynamic* pActor = pBody->is<PSX::PxRigidDynamic>();
@@ -536,6 +537,10 @@ void CPhysX_Manager::Update_Kinematic()
if (pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC)
{
if (nullptr == pBody->userData) {
ReleasedList.emplace_back(pBody);
continue;
}
PHYSX_USERDATA* pUserData = (PHYSX_USERDATA*)pBody->userData;
if (false == pUserData->bAutoOwnerTranslation) {
continue;
@@ -546,6 +551,10 @@ void CPhysX_Manager::Update_Kinematic()
}
}
}
for (list<PSX::PxActor*>::iterator ReleasedActor = ReleasedList.begin(); ReleasedActor != ReleasedList.end();) {
Detach_Actor(*(*ReleasedActor), m_pGameInstance->Get_CurrentLevelID());
ReleasedActor = ReleasedList.erase(ReleasedActor);
}
}
void CPhysX_Manager::Update(_float fTimeDelta)
@@ -573,6 +582,7 @@ void CPhysX_Manager::Update(_float fTimeDelta)
}
void CPhysX_Manager::Update_Dynamic_ActiveActors()
{
list<PSX::PxActor*> ReleasedList = {};
PSX::PxU32 iNumActiveActor = {};
PSX::PxActor** ppActiveActors = m_pScene->getActiveActors(iNumActiveActor);
@@ -581,6 +591,7 @@ void CPhysX_Manager::Update_Dynamic_ActiveActors()
PSX::PxRigidDynamic* pActorDynamic = ppActiveActors[i]->is<PSX::PxRigidDynamic>();
if (nullptr != pActorDynamic) {
if (nullptr == ppActiveActors[i]->userData) {
ReleasedList.emplace_back(ppActiveActors[i]);
continue;
}
if (false == pUserData->bAutoOwnerTranslation) {
@@ -596,6 +607,10 @@ void CPhysX_Manager::Update_Dynamic_ActiveActors()
pTransform->Set_WorldMatrix(WorldMatrix);
}
}
for (list<PSX::PxActor*>::iterator ReleasedActor = ReleasedList.begin(); ReleasedActor != ReleasedList.end();) {
Detach_Actor(*(*ReleasedActor), m_pGameInstance->Get_CurrentLevelID());
ReleasedActor = ReleasedList.erase(ReleasedActor);
}
}
void CPhysX_Manager::FixCapsuleShapeAxisToY(PSX::PxShape* pShape)
@@ -475,10 +475,11 @@ CComponent* CRigidBody_Dynamic::Clone(void* pArg, CGameObject* pOwner)
void CRigidBody_Dynamic::Free()
{
__super::Free();
if (nullptr != m_pRigidBody) {
m_pRigidBody->userData = nullptr;
m_pRigidBody = nullptr;
}
__super::Free();
}
#ifdef _DEBUG