From 5f0973366367edd29caf42d113279c792aa890e0 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 13 Nov 2010 00:29:43 +0000 Subject: do not enable physics on entities with the NonSolid flag set --- src/core/entity.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/entity.cc') 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(); -- cgit v1.2.3