diff options
author | Stijn Buys <ingar@osirion.org> | 2011-01-21 14:41:35 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-01-21 14:41:35 +0000 |
commit | 035653e94a3d74b8f18c993034199d7cd08a895a (patch) | |
tree | 6acc56c14a86b499657b6e7faaf50f9e6f7ff57d /src/core/physics.cc | |
parent | 4af61dca099d2b7010d4fa83833ceeeef01b0b0f (diff) |
Support structures for complex entity collision,
renamed sv_arrysize cvar to mem_vertex.
Diffstat (limited to 'src/core/physics.cc')
-rw-r--r-- | src/core/physics.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/physics.cc b/src/core/physics.cc index 4dadf07..6969b06 100644 --- a/src/core/physics.cc +++ b/src/core/physics.cc @@ -4,19 +4,22 @@ the terms and conditions of the GNU General Public License version 2 */ +#include "model/collisionmesh.h" #include "core/physics.h" #include "core/zone.h" namespace core { -btDefaultCollisionConfiguration *Physics::physics_configuration; -btCollisionDispatcher *Physics::physics_dispatcher; -btSequentialImpulseConstraintSolver *Physics::physics_solver; -unsigned long Physics::physics_timestamp; +btDefaultCollisionConfiguration *Physics::physics_configuration = 0; +btCollisionDispatcher *Physics::physics_dispatcher = 0; +btSequentialImpulseConstraintSolver *Physics::physics_solver = 0; +unsigned long Physics::physics_timestamp = 0; void Physics::init() { con_print << "^BInitializing physics engine..." << std::endl; + + model::CollisionMesh::init(); physics_configuration = new btDefaultCollisionConfiguration(); physics_dispatcher = new btCollisionDispatcher(physics_configuration); @@ -27,7 +30,10 @@ void Physics::init() void Physics::done() { - con_print << "^Bshutting down physics engine..." << std::endl; + con_print << "^BShutting down physics engine..." << std::endl; + + model::CollisionMesh::shutdown(); + delete physics_solver; delete physics_dispatcher; delete physics_configuration; |