Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/entity.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 6ae9e87..825f9bf 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -502,9 +502,10 @@ MenuDescription *Entity::find_menu(std::string const &label)
void Entity::remove_menu(std::string const &label)
{
for (Menus::iterator it = menus().begin(); it != menus().end(); it++) {
- if (label.compare((*it)->label()) == 0)
+ if (label.compare((*it)->label()) == 0) {
menus().erase(it);
- return;
+ return;
+ }
}
}
@@ -702,7 +703,7 @@ void EntityDynamic::reset()
}
// remove Docked and Destroyed entities from the physics simulation
- if ((state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) {
+ if (destroyed() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) {
if (entity_body) {
@@ -1228,7 +1229,7 @@ void EntityControlable::reset()
}
// remove Docked and Destroyed entities from the physics simulation
- if ((state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) {
+ if (destroyed() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) {
if (entity_body) {