diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-13 00:29:43 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-13 00:29:43 +0000 |
commit | 5f0973366367edd29caf42d113279c792aa890e0 (patch) | |
tree | 2a4710b1c26f1999a39184f4e9cea7ee7786ab7e | |
parent | bbf1d9537e7b7817b41601968f8852a0f811c30a (diff) |
do not enable physics on entities with the NonSolid flag set
-rw-r--r-- | src/core/entity.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index fe33d2a..35164dc 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -501,7 +501,7 @@ void Entity::remove_menu(std::string const &label) void Entity::reset() { - if (!radius()) { + if (!radius() || flag_is_set(NonSolid)) { return; } @@ -577,6 +577,10 @@ void EntityDynamic::set_state(int state) void EntityDynamic::reset() { + if (!radius() || flag_is_set(NonSolid)) { + return; + } + Entity::reset(); if (entity_state == Docked) { @@ -933,9 +937,10 @@ void EntityControlable::set_zone(Zone *zone) void EntityControlable::reset() { - if (!radius()) + if (!radius() || flag_is_set(NonSolid)) { return; - + } + // location and orientation btTransform t; t.setIdentity(); |