diff options
author | Stijn Buys <ingar@osirion.org> | 2010-09-16 14:12:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-09-16 14:12:27 +0000 |
commit | 0c509866a37ab47ff0e48d357ca55e31658c37c2 (patch) | |
tree | 57f69397ac1b30ce42a3e3fcd19c2fd8ed67d4e0 /src/core/entity.cc | |
parent | 3392cb739f212aea561eceb1781cd2e10e55c932 (diff) |
map info support, initial trade window
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index aa9e45b..baefcea 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -204,6 +204,10 @@ void Entity::clear_updates() void Entity::set_info(Info *info) { entity_info = info; + if (entity_info) { + entity_info->set_model(model()); + entity_info->set_name(name()); + } } void Entity::set_inventory(Inventory *inventory) @@ -237,7 +241,13 @@ void Entity::set_model(model::Model *model) entity_model = model; if (entity_model) { entity_radius = entity_model->radius(); - entity_modelname = entity_model->name(); + entity_modelname.assign(entity_model->name()); + } else { + entity_modelname.clear(); + } + + if (entity_info) { + entity_info->set_model(entity_model); } } |