diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-12 16:24:17 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-12 16:24:17 +0000 |
commit | b460b3193e54b7364bb75ff26ce6f999887e454b (patch) | |
tree | d35e4972fd3ee54b9922908e3791a53bae96af14 /src/core/entity.cc | |
parent | c0c2a0ccc335b00983bf69b99b7a44505ed24b47 (diff) |
moved global entity info type to core::Entity::infotype(),
automatic generation of jumppoint and jumpgate names and descriptions,
prepared game code for the seperation of Entity::radius() and Model::radius()
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index 7f48c08..9e467fe 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -29,6 +29,8 @@ using math::Vector3f; /* ---- Static functions for the Entity registry ------------------- */ +const InfoType *Entity::entity_infotype = 0; + Entity::Registry Entity::entity_registry; size_t Entity::entity_nextid = 0; @@ -314,7 +316,9 @@ void Entity::set_model(model::Model *model) // server-side property should not clear modelname entity_model = model; if (entity_model) { - entity_radius = entity_model->radius(); + + //entity_radius = entity_model->radius(); + entity_modelname.assign(entity_model->name()); } @@ -502,6 +506,10 @@ void Entity::remove_menu(std::string const &label) void Entity::reset() { + if (!radius()) { + return; + } + // location and orientation btTransform t; t.setIdentity(); @@ -918,7 +926,7 @@ void EntityControlable::set_zone(Zone *zone) if (entity_zone) { entity_zone->add(this); - if (body() && entity_zone->physics()) { + if (body() && entity_zone->physics()) { entity_zone->physics()->addRigidBody(body()); entity_zone->physics()->addAction(entity_actioninterface); reset(); |