diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-17 00:21:03 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-07-17 00:21:03 +0200 |
commit | 2756ca1c350a7545e3a9e848e9b4db9b904f3a14 (patch) | |
tree | 3a119d8ad99a372e3e2d6e014dee9d4b1e6a8d55 /src/common/Collision/Models/GameObjectModel.h | |
parent | 4862033a44c3385f7f63725088caf595b30e02a6 (diff) |
Core/GameObject: Implemented NotLOSBlocking door property
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.h')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/Collision/Models/GameObjectModel.h b/src/common/Collision/Models/GameObjectModel.h index 1cfe27a050e..8a315e8b7d5 100644 --- a/src/common/Collision/Models/GameObjectModel.h +++ b/src/common/Collision/Models/GameObjectModel.h @@ -59,7 +59,7 @@ public: class TC_COMMON_API GameObjectModel /*, public Intersectable*/ { - GameObjectModel() : _collisionEnabled(false), iInvScale(0), iScale(0), iModel(nullptr) { } + GameObjectModel() : iCollisionEnabled(false), iInvScale(0), iScale(0), iModel(nullptr) { } public: const G3D::AABox& getBounds() const { return iBound; } @@ -68,12 +68,14 @@ public: const G3D::Vector3& getPosition() const { return iPos;} /* Enables/disables collision */ - void enableCollision(bool enable) { _collisionEnabled = enable; } - bool isCollisionEnabled() const { return _collisionEnabled; } - bool isMapObject() const; + void EnableCollision(bool enable) { iCollisionEnabled = enable; } + bool IsCollisionEnabled() const { return iCollisionEnabled; } + void DisableLosBlocking(bool enable) { iLosBlockingDisabled = enable; } + bool IsLosBlockingDisabled() const { return iLosBlockingDisabled; } + bool IsMapObject() const; uint8 GetNameSetId() const { return owner->GetNameSetId(); } - bool intersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const; + bool IntersectRay(G3D::Ray const& ray, float& maxDist, bool stopAtFirstHit, PhaseShift const& phaseShift, VMAP::ModelIgnoreFlags ignoreFlags) const; bool GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationInfo& info, PhaseShift const& phaseShift) const; bool GetLiquidLevel(G3D::Vector3 const& point, VMAP::LocationInfo& info, float& liqHeight) const; @@ -84,7 +86,8 @@ public: private: bool initialize(std::unique_ptr<GameObjectModelOwnerBase> modelOwner, std::string const& dataPath); - bool _collisionEnabled; + bool iCollisionEnabled; ///< Is model ignored in all checks + bool iLosBlockingDisabled; ///< Is model ignored during line of sight checks (but is always included in location/height checks) G3D::AABox iBound; G3D::Matrix3 iInvRot; G3D::Vector3 iPos; |