diff options
| author | Léo Lam <leo@leolam.fr> | 2022-03-21 00:45:06 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-03-21 03:00:36 +0100 |
| commit | ec37bc00181e69a88a410e2807d5f560bae81529 (patch) | |
| tree | 1ba1830c665f547c1720ef296d94486fa4b5bb72 /src/KingSystem/Map/mapAutoPlacement.cpp | |
| parent | 509d557731ce02136f79026ce1e1d5683c93876f (diff) | |
ksys/phys: Add RayCastRequestMgr
Diffstat (limited to 'src/KingSystem/Map/mapAutoPlacement.cpp')
| -rw-r--r-- | src/KingSystem/Map/mapAutoPlacement.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/KingSystem/Map/mapAutoPlacement.cpp b/src/KingSystem/Map/mapAutoPlacement.cpp index a49e6153..b47494c8 100644 --- a/src/KingSystem/Map/mapAutoPlacement.cpp +++ b/src/KingSystem/Map/mapAutoPlacement.cpp @@ -7,23 +7,12 @@ #include "KingSystem/Map/mapAutoPlacementFlowMgr.h" #include "KingSystem/Map/mapAutoPlacementMgr.h" #include "KingSystem/Physics/RigidBody/physRigidBody.h" -#include "KingSystem/Physics/System/physRayCast.h" +#include "KingSystem/Physics/System/physRayCastForRequest.h" #include "KingSystem/Utils/Byaml/Byaml.h" #include "KingSystem/World/worldWeatherMgr.h" namespace ksys::map { -// TODO: this phys::RayCast derived class should be moved to phys:: -struct Raycast : phys::RayCast { - Raycast(); - ~Raycast() override; - - static Raycast* create(void*, u32); - - void sub_7100FC55AC(u32); - void release(); -}; - AutoPlacement::AutoPlacement() = default; AutoPlacement::~AutoPlacement() = default; @@ -284,11 +273,11 @@ void PlacementThing::stepRaycast() { switch (mState) { case State::Uninitialized: - mRaycast = Raycast::create(nullptr, 1); + mRaycast = phys::RayCastForRequest::allocRequest(nullptr, phys::GroundHit::Animal); next = mRaycast != nullptr ? State::Initialized : State::Invalid; break; case State::LayersDone: - mRaycast->sub_7100FC55AC(0); + mRaycast->submitRequest(phys::ContactLayerType::Entity); next = State::RaycastDone; break; case State::PlacementDone: |
