[fix] 란록 브레스 수정

[fix] 게임플레이 레벨 노출값 수
This commit is contained in:
kimnuri
2026-02-01 21:26:07 +09:00
parent 707e44291e
commit 0ad74c349a
5 changed files with 87 additions and 72 deletions
@@ -867,75 +867,89 @@ ON_COLLISION_INFO CEffect_Container::MonsterSweepTarget(_fvector StartPos, _fvec
_float fDistance = XMVectorGetX(XMVector3Length(vEndPos - vStartPos));
PSX::PxSweepBuffer pxBuffer = {};
PSX::PxSweepBufferN<12> pxBuffer = {};
_bool bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eDYNAMIC, pxBuffer);
const PSX::PxSweepHit& hit = pxBuffer.block;
PSX::PxRigidActor* pActor = hit.actor;
PSX::PxShape* pShape = hit.shape;
ON_COLLISION_INFO tagCollInfo = {};
tagCollInfo.vWorldPos.w = 1.f;
if (bHit) {
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
tagCollInfo.fLength = fDistance;
if (nullptr != pActor && nullptr != pActor->userData)
{
PHYSX_USERDATA* pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
tagCollInfo.pObject = pUserData->pOwner;
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_PROJECTILE);
tagCollInfo.fDamage = 10.f;
switch (pUserData->eKind)
{
case PHYSX_KIND::BODY_DYNAMIC:
switch (PXOBJECT(pUserData->iSubKind))
{
case PXOBJECT::SKILL_PROTEGO:
{
pUserData->pOwner->OnCollision(this, &tagCollInfo);
m_bHit = true;
m_bHitShield = true;
}
break;
}
break;
case PHYSX_KIND::CCTActor:
{
switch (PXOBJECT(pUserData->iSubKind))
{
case PXOBJECT::PLAYER:
{
pUserData->pOwner->OnCollision(this, &tagCollInfo);
m_bHit = true;
}
break;
}
}
}
vector<PSX::PxSweepHit*> Hits;
_uint iHitCount = pxBuffer.nbTouches;
if (true == pxBuffer.hasBlock) {
iHitCount += 1;
Hits.reserve(iHitCount);
Hits.emplace_back(&pxBuffer.block);
}
else {
Hits.reserve(iHitCount);
}
for (_uint i = 0; i < pxBuffer.nbTouches; ++i) {
Hits.emplace_back(&pxBuffer.touches[i]);
}
for (_uint i = 0; i < Hits.size(); ++i) {
const PSX::PxSweepHit& hit = *Hits[i];
PSX::PxRigidActor* pActor = hit.actor;
PSX::PxShape* pShape = hit.shape;
tagCollInfo.vWorldPos.w = 1.f;
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
tagCollInfo.fLength = fDistance;
if (nullptr != pActor && nullptr != pActor->userData || nullptr != pShape && nullptr != pShape->userData)
{
PHYSX_USERDATA* pUserData = nullptr;
if (nullptr == pActor->userData) {
pUserData = static_cast<PHYSX_USERDATA*>(pShape->userData);
}
else {
pUserData = static_cast<PHYSX_USERDATA*>(pActor->userData);
}
tagCollInfo.pObject = pUserData->pOwner;
tagCollInfo.eHitType = ENUM_CLASS(HIT_TYPE::HIT_PROJECTILE);
tagCollInfo.fDamage = 10.f;
switch (pUserData->eKind)
{
case PHYSX_KIND::BODY_DYNAMIC:
switch (PXOBJECT(pUserData->iSubKind))
{
case PXOBJECT::SKILL_PROTEGO:
{
pUserData->pOwner->OnCollision(this, &tagCollInfo);
m_bHit = true;
m_bHitShield = true;
}
break;
}
break;
case PHYSX_KIND::CCTActor:
{
switch (PXOBJECT(pUserData->iSubKind))
{
case PXOBJECT::PLAYER:
{
pUserData->pOwner->OnCollision(this, &tagCollInfo);
m_bHit = true;
}
break;
}
}
default:
break;
}
}
}
}
if (isTerrainCollision == true && bHit == false)
{
memcpy_s(&tagCollInfo.vWorldPos, sizeof(tagCollInfo.vWorldPos), &hit.position, sizeof(hit.position));
memcpy_s(&tagCollInfo.vWorldNomal, sizeof(tagCollInfo.vWorldNomal), &hit.normal, sizeof(hit.normal));
XMStoreFloat4(&tagCollInfo.vHitDir, vDir);
tagCollInfo.fLength = fDistance;
tagCollInfo.pObject = m_pOwner->Get_Owner();
bHit = m_pGameInstance->SphereCast(fRadius, vStartPos, vDir, fDistance, PSX::PxHitFlag::ePOSITION | PSX::PxHitFlag::eNORMAL, PSX::PxQueryFlag::eSTATIC, pxBuffer);
const PSX::PxSweepHit& hit = pxBuffer.block;
@@ -374,7 +374,7 @@ void CLevel_Field::ResetLevel_Environment()
m_pLight->Get_Component<CLight>()->Set_Color(vDiffuse, vAmbient, vSpecular);
m_pLight->Get_Component<CTransform>()->RotationQ(XMVectorSet(-0.574f, -0.409f, 0.584f, -0.402f));
m_pLight->Get_Component<CTransform>()->Translation(XMVectorSet(0.f, 0.f, 0.f, 1.f));
m_pGameInstance->Set_Environment(_float3(0.585f, 0.182f, 2.83f), _float(2.f), _float2(0.019f, 0.161f),
m_pGameInstance->Set_Environment(_float3(0.585f, 0.182f, 2.83f), _float(0.5f), _float2(0.019f, 0.161f),
_float2(2.300f, 10.000f), _float4(0.0360f, 0.0326f, 0.0057f, 0.0018f), _float4(2.0000f, 1.f, 1.f, 1.f), _float3(0.f, 0.f, -100.f), _float3(0.f, 0.f, 100.f));
m_pGameInstance->Setting_Volumetirc(1.743f, 0.0001f, 0.2000f, 1.050f, 0.04862f);
m_pLight->Capture_PreShadow();
@@ -125,7 +125,7 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
_bool bLoadNPC = { true };
#ifdef _DEBUG
#ifdef 기무리
bLoadNPC = true;
bLoadNPC = false;
#endif
#endif // _DEBUG
if (true == bLoadNPC) {
@@ -169,7 +169,7 @@ void CLevel_GamePlay::Update(_float fTimeDelta)
_bool bStartCinematic = { true };
#ifdef _DEBUG
#ifdef 기무리
bStartCinematic = true;
bStartCinematic = false;
#elif 진우
bStartCinematic = true;
#elif Bin
@@ -363,9 +363,9 @@ HRESULT CLevel_GamePlay::Ready_Background()
isReady_Hogwart = false;
#endif //
#ifdef 기무리
isReady_Background = true;
isReady_Hogsmeade = true;
isReady_Hogwart = true;
isReady_Background = false;
isReady_Hogsmeade = false;
isReady_Hogwart = false;
#endif //
#ifdef 나
isReady_Background = false;
@@ -1157,8 +1157,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc()
isLoad_NPC = false;
#endif //
#ifdef 기무리
isLoad_NPC = true;
isLoad_RandomNPC = true;
isLoad_NPC = false;
isLoad_RandomNPC = false;
#endif //
#ifdef 나
isLoad_RandomNPC = true;
@@ -1243,7 +1243,7 @@ void CLevel_GamePlay::ResetLevel_Environment()
m_pLight->Get_Component<CTransform>()->RotationQ(XMVectorSet(0.581f, 0.239f, -0.183f, 0.757f));
m_pLight->Get_Component<CTransform>()->Translation(XMVectorSet(0.f, 0.f, 0.f, 1.f));
m_pGameInstance->Set_Environment(_float3(0.54300f, 0.40100f, 4.00000f), _float(0.700), _float2(0.019f, 0.161f),
m_pGameInstance->Set_Environment(_float3(0.54300f, 0.40100f, 4.00000f), _float(0.5f), _float2(0.019f, 0.161f),
_float2(2.300f, 10.000f), _float4(0.0047f, 0.0018f, 0.0018f, 0.0018f),
_float4(2.f, 1.f, 1.f, 1.f), _float3(-10.f, -10.f, -50.f), _float3(10.f, 10.f, 50.f));
m_pLight->Capture_PreShadow();
+3 -3
View File
@@ -581,9 +581,9 @@ HRESULT CLoader::Loading_For_GamePlay()
#endif //
#ifdef 기무리
isLoad_Background = true;
isLoad_Hogwart = true;
isLoad_UI_SEQUANTIAL = true;
isLoad_NPC = true;
isLoad_Hogwart = false;
isLoad_UI_SEQUANTIAL = false;
isLoad_NPC = false;
isLoad_Monster = true;
#endif //
#ifdef 나
@@ -103,10 +103,11 @@ void CRanrok_Breath::Update(_float fTimeDelta)
if (m_isStartRayCast == true)
{
ON_COLLISION_INFO CollisionInfo = MonsterRayCast(XMLoadFloat4(&m_vStartPos), CombinedMat.r[2] * -1.f, 50.f, 50);
ON_COLLISION_INFO CollisionInfo = MonsterRayCast(vStartPos, CombinedMat.r[2] * -1.f, 50.f, 50);
if (m_bHit = true)
OnCollision(this, &CollisionInfo);
_vector vEndPos = vStartPos + CombinedMat.r[2] * -1.f * 50.f;
MonsterSweepTarget(vStartPos, vEndPos, 0.6f, false);
}