diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index d5bf66cf1..05c932845 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -120,8 +120,23 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) return E_FAIL; } - if (FAILED(Ready_Layer_RacerAI(LAYER_RACERAI))) { - return E_FAIL; + _bool bLoadNPC = { true }; +#ifdef _DEBUG +#ifdef 기무리 + bLoadNPC = false; +#endif +#endif // _DEBUG + if (true == bLoadNPC) { + if (FAILED(Ready_Layer_RacerAI(LAYER_RACERAI))) { + return E_FAIL; + } + if (FAILED(Ready_Layer_Duelist())) { + return E_FAIL; + } + + if (FAILED(Ready_Layer_Npc())) { + return E_FAIL; + } } @@ -129,14 +144,6 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg) return E_FAIL; } - if (FAILED(Ready_Layer_Duelist())) { - return E_FAIL; - } - - if (FAILED(Ready_Layer_Npc())) { - return E_FAIL; - } - if (FAILED(m_pInfoInstance->Late_Initialize())) return E_FAIL; @@ -332,9 +339,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; @@ -1006,7 +1013,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster() isLoad_Monster = true; #endif // #ifdef 기무리 - isLoad_Monster = true; + isLoad_Monster = false; #endif // #ifdef 나 @@ -1118,8 +1125,8 @@ HRESULT CLevel_GamePlay::Ready_Layer_Npc() isLoad_NPC = true; #endif // #ifdef 기무리 - isLoad_NPC = true; - isLoad_RandomNPC = true; + isLoad_NPC = false; + isLoad_RandomNPC = false; #endif // #ifdef 나 isLoad_RandomNPC = true; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 88b9a10b2..18075c7c3 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -480,9 +480,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 나 @@ -2436,7 +2436,7 @@ HRESULT CLoader::Loading_For_GamePlay() Desc1.ePxMaterialTypes = { PXMATERIAL::DEFAULT }; Desc1.vMatInfo = { 0.5f, 0.5f, 0.6f }; Desc1.fContactOffset = { 0.05f }; - Desc1.vhalfGeometryInfo = { 2.f, 2.f, 2.f }; + Desc1.vhalfGeometryInfo = { 2.34f, 2.34f, 2.34f }; Desc1.fDensity = 1.f; Desc1.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY()); Desc1.eLockFlag = {}; diff --git a/Jusin154_Team3D/Client/Private/Player.cpp b/Jusin154_Team3D/Client/Private/Player.cpp index 004e57b9c..f27061014 100644 --- a/Jusin154_Team3D/Client/Private/Player.cpp +++ b/Jusin154_Team3D/Client/Private/Player.cpp @@ -255,7 +255,7 @@ HRESULT CPlayer::Render() } #ifdef _DEBUG #ifdef 기무리 - Render_CameraCoordinateSystem(); + //Render_CameraCoordinateSystem(); #endif // 기무리 //m_pCharacter_Controller->Render(); #endif // _DEBUG @@ -640,6 +640,9 @@ HRESULT CPlayer::Ready_Components() } m_pCharacter_Controller->SetGravity(false); m_pCharacter_Controller->Set_GravityAmount(1.2f); +#ifdef _DEBUG + m_pCharacter_Controller->Set_Name("CCT_PLAYER"); +#endif // _DEBUG } { // DO diff --git a/Jusin154_Team3D/Client/Private/TriggerBox.cpp b/Jusin154_Team3D/Client/Private/TriggerBox.cpp index f08306bff..eb45ffbf4 100644 --- a/Jusin154_Team3D/Client/Private/TriggerBox.cpp +++ b/Jusin154_Team3D/Client/Private/TriggerBox.cpp @@ -1,5 +1,7 @@ #include "pch.h" #include "TriggerBox.h" +#include "Layer.h" +#include "Player.h" CTriggerBox::CTriggerBox(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -50,60 +52,82 @@ HRESULT CTriggerBox::Initialize(TRIGGERBOX_DESC* pDesc) Desc.fRadius = pDesc->vPosition_Radius.w; Desc.fRotationPerSec = 0; Desc.fSpeedPerSec = 0; - if (FAILED(__super::Initialize(pDesc))) { + if (FAILED(__super::Ready_Components(&Desc))) { return E_FAIL; } m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat4(&pDesc->vPosition_Radius), 1.f)); - m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, m_pTransformCom->Get_Radius(), 12, false, false)); + m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, m_pTransformCom->Get_Radius() * 2.f, 12, false, false)); m_Batch = make_unique>(m_pContext); + + m_vScanTimer.y += m_pGameInstance->Real_Random_Float(0.f, 0.2f); + return S_OK; } HRESULT CTriggerBox::Scan() { _float fRadius = m_pTransformCom->Get_Radius(); - PSX::PxSweepBuffer pxBuffer = {}; + + PSX::PxSweepHit hitBuffer[32]; + PSX::PxSweepBuffer pxBuffer(hitBuffer, 32); _bool bHit = m_pGameInstance->SphereCast(fRadius, m_pTransformCom->Get_State(STATE::POSITION), XMVectorSet(0.f, 1.f, 0.f, 0.f), 0.1f, - PSX::PxHitFlag::ePOSITION, PSX::PxQueryFlag::eDYNAMIC, pxBuffer); + PSX::PxHitFlag::eDEFAULT, PSX::PxQueryFlag::eDYNAMIC, pxBuffer); const PSX::PxSweepHit & hit = pxBuffer.block; PSX::PxRigidActor* pActor = hit.actor; + _uint iHitCount = pxBuffer.getNbAnyHits(); + HRESULT hr = E_FAIL; if (bHit) { - if (nullptr != pActor && nullptr != pActor->userData) - { - PHYSX_USERDATA* pUserData = static_cast(pActor->userData); - switch (pUserData->eKind) - { - case PHYSX_KIND::BODY_DYNAMIC: - { - switch (PXOBJECT(pUserData->iSubKind)) - { - case PXOBJECT::PLAYER: - { - return S_OK; - }break; - default: - break; - } - }break; - case PHYSX_KIND::CCTActor: - { - switch (PXOBJECT(pUserData->iSubKind)) - { - case PXOBJECT::PLAYER: { - return S_OK; - } break; - default: + hr = CheckPlayerHit(pActor); + if (FAILED(hr)) { + for (_uint i = 0; i < iHitCount; ++i) { + PSX::PxSweepHit* pHit = &pxBuffer.touches[i]; + hr = CheckPlayerHit(pHit->actor); + if (SUCCEEDED(hr)) { break; } + } + } + } + return hr; +} + +HRESULT CTriggerBox::CheckPlayerHit(PSX::PxActor* pActor) +{ + if (nullptr != pActor && nullptr != pActor->userData) + { + PHYSX_USERDATA* pUserData = static_cast(pActor->userData); + switch (pUserData->eKind) + { + case PHYSX_KIND::BODY_DYNAMIC: + { + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::PLAYER: + { + return S_OK; + }break; + default: + break; + } + }break; + case PHYSX_KIND::CCTActor: + { + switch (PXOBJECT(pUserData->iSubKind)) + { + case PXOBJECT::PLAYER: { + return S_OK; } break; default: break; } + } break; + default: + break; } } - return E_FAIL; + return E_FAIL; } CTriggerBox* CTriggerBox::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TRIGGERBOX_DESC* Desc) diff --git a/Jusin154_Team3D/Client/Private/UI_Manager.cpp b/Jusin154_Team3D/Client/Private/UI_Manager.cpp index 9cde886a1..06dad9149 100644 --- a/Jusin154_Team3D/Client/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Client/Private/UI_Manager.cpp @@ -86,7 +86,10 @@ void CUI_Manager::Canvas_Change(UI_STATE eType) static_cast(m_pDialogue_Canvas)->Visible(false); static_cast(m_pInteraction_Key)->Set_Visible(true); static_cast(m_pNPCInteraction)->Set_Visible(true); +#ifndef 기무리 static_cast(m_pBroom_TargetGate)->Set_Visible(false); +#endif // 기무리 + break; case UI_STATE::SPELL: diff --git a/Jusin154_Team3D/Client/Public/TriggerBox.h b/Jusin154_Team3D/Client/Public/TriggerBox.h index 04ae4f35a..e058df699 100644 --- a/Jusin154_Team3D/Client/Public/TriggerBox.h +++ b/Jusin154_Team3D/Client/Public/TriggerBox.h @@ -30,10 +30,11 @@ class CTriggerBox final : public CGameObject private: HRESULT Initialize(TRIGGERBOX_DESC*); HRESULT Scan(); + HRESULT CheckPlayerHit(PSX::PxActor* pActor); private: - _float2 m_vScanTimer = { 0.f, 0.5f }; + _float2 m_vScanTimer = { 0.f, 0.8f }; #ifdef _DEBUG _bool m_bRender = false; unique_ptr m_pSubShape = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml index b6ea1406d..b04416f77 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/CutScene/CarriageIntro.xml @@ -258,43 +258,6 @@ - - - - - - - - - - - false - false - true - false - false - false - false - false - false - false - false - false - false - false - false - false - - - - - - - - - - - diff --git a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp index 7a353902f..80ad1e4e2 100644 --- a/Jusin154_Team3D/Engine/Private/Character_Controller.cpp +++ b/Jusin154_Team3D/Engine/Private/Character_Controller.cpp @@ -61,6 +61,10 @@ HRESULT CCharacter_Controller::Render() } return S_OK; } +void CCharacter_Controller::Set_Name(const _char* pName) +{ + m_pController->getActor()->setName(pName); +} #endif // _DEBUG PSX::PxRigidDynamic* CCharacter_Controller::Get_Actor() { diff --git a/Jusin154_Team3D/Engine/Private/GameInstance.cpp b/Jusin154_Team3D/Engine/Private/GameInstance.cpp index b13b74b4a..7d84edbeb 100644 --- a/Jusin154_Team3D/Engine/Private/GameInstance.cpp +++ b/Jusin154_Team3D/Engine/Private/GameInstance.cpp @@ -52,9 +52,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De } } #ifdef _DEBUG -#ifdef 기무리 - m_pThreadHolder = CThreadHolder::Create(8); -#elif Bin +#ifdef Bin m_pThreadHolder = CThreadHolder::Create(8); #else m_pThreadHolder = CThreadHolder::Create(6); @@ -65,9 +63,6 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De m_pThreadHolder = CThreadHolder::Create(12); #endif // !_DEBUG - - - if (nullptr == m_pThreadHolder) { return E_FAIL; } diff --git a/Jusin154_Team3D/Engine/Public/Character_Controller.h b/Jusin154_Team3D/Engine/Public/Character_Controller.h index 08118b0ba..1572d270c 100644 --- a/Jusin154_Team3D/Engine/Public/Character_Controller.h +++ b/Jusin154_Team3D/Engine/Public/Character_Controller.h @@ -49,6 +49,7 @@ class ENGINE_DLL CCharacter_Controller final : public: #ifdef _DEBUG virtual HRESULT Render() override; + virtual void Set_Name(const _char* pName); #endif PSX::PxRigidDynamic* Get_Actor(); PSX::PxController* Get_Controller(); diff --git a/Jusin154_Team3D/Engine/Public/PhysX/PxQueryReport.h b/Jusin154_Team3D/Engine/Public/PhysX/PxQueryReport.h index 06e66e6dd..6a40552a1 100644 --- a/Jusin154_Team3D/Engine/Public/PhysX/PxQueryReport.h +++ b/Jusin154_Team3D/Engine/Public/PhysX/PxQueryReport.h @@ -1,4 +1,4 @@ -// Redistribution and use in source and binary forms, with or without +// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright