From 8039544940b6145dcc8c63bcd4e06073ed61801e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 10 Nov 2013 22:23:50 +0000 Subject: Renamed entity_destroyed to entity_died to prevent confusion with the Entity::Destroyed state, fixed a potential memory leak. --- src/core/entity.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/entity.cc') diff --git a/src/core/entity.cc b/src/core/entity.cc index 7d538a0..efd6248 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -152,7 +152,7 @@ Entity::Entity() : entity_shape = Diamond; entity_created = true; - entity_destroyed = false; + entity_died = false; entity_dirty = false; entity_keepalive = 0; @@ -190,7 +190,7 @@ Entity::Entity(std::istream & is) entity_speed = 0.0f; entity_created = true; - entity_destroyed = false; + entity_died = false; entity_inventory = 0; entity_slots = 0; @@ -363,7 +363,7 @@ void Entity::print_inventory() const void Entity::die() { - entity_destroyed = true; + entity_died = true; } void Entity::clear_updates() @@ -884,7 +884,7 @@ void EntityDynamic::reset() } // remove Docked and Destroyed entities from the physics simulation - if (destroyed() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) { + if (died() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) { if (entity_body) { @@ -1468,7 +1468,7 @@ void EntityControlable::reset() } // remove Docked and Destroyed entities from the physics simulation - if (destroyed() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) { + if (died() || (state() == core::Entity::Docked) || (state() == core::Entity::Destroyed)) { if (entity_body) { -- cgit v1.2.3