Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-10 22:23:50 +0000
committerStijn Buys <ingar@osirion.org>2013-11-10 22:23:50 +0000
commit8039544940b6145dcc8c63bcd4e06073ed61801e (patch)
treef3adf9eebb1ffe6a8c53e57c64546eeaa61a3517 /src/core/entity.cc
parent3b75b41676bd2851b6d2b61d3e3213ee50078870 (diff)
Renamed entity_destroyed to entity_died to prevent confusion with the Entity::Destroyed state,
fixed a potential memory leak.
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc10
1 files changed, 5 insertions, 5 deletions
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) {