diff options
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/core/entity.h b/src/core/entity.h index a356525..230ce1b 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -167,8 +167,17 @@ public: } /// physics collision shape - inline CollisionShapes collision_shapes() { - return entity_collision_shapes; + inline btCollisionShape *collision_shape() { + return entity_collision_shape; + } + + /** + * @brief physics collision child shapes + * if the collision_shape is not a btcompoundShape, + * this set will be empty + **/ + inline CollisionShapes & collision_child_shapes() { + return entity_collision_child_shapes; } /// indicates a server-side entity @@ -196,11 +205,6 @@ public: return entity_menus; } - /// entity collision shapes - inline CollisionShapes & shapes() { - return entity_collision_shapes; - } - /// extensions inline Extension *extension(size_t type) const { return entity_extension[type]; @@ -453,7 +457,12 @@ public: protected: btRigidBody *entity_body; btRigidBody::btRigidBodyConstructionInfo *entity_body_info; - CollisionShapes entity_collision_shapes; + + // the main bullet collision shape for this entity + btCollisionShape *entity_collision_shape; + + // bullet collision child shapes for this entity, + CollisionShapes entity_collision_child_shapes; // the zone the entity belongs to Zone* entity_zone; |