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>2011-08-07 12:14:12 +0000
committerStijn Buys <ingar@osirion.org>2011-08-07 12:14:12 +0000
commit33fabb093ff391dda41b04f6a6634c940e134e9c (patch)
tree773a549585cc09695687dd70378063859e6597e8
parent219d005ad0643a0b94b3f02de563c9ebd91a2761 (diff)
Add zone label to the entity info label.
-rw-r--r--src/core/parser.cc10
-rw-r--r--src/game/base/jumppoint.cc5
2 files changed, 13 insertions, 2 deletions
diff --git a/src/core/parser.cc b/src/core/parser.cc
index 984d403..01d4dba 100644
--- a/src/core/parser.cc
+++ b/src/core/parser.cc
@@ -50,10 +50,18 @@ bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity)
Info *info = Info::find(entity->info());
if (!info) {
- info = new Info(Entity::infotype(), entity->label().c_str());
+ std::string labelstr;
+ if (entity->zone()) {
+ labelstr.append(entity->zone()->label());
+ labelstr += ':';
+ }
+ labelstr.append(entity->label());
+ info = new Info(Entity::infotype(), labelstr.c_str());
entity->set_info(info);
}
+
info->add_text(strval);
+
return true;
} else if (inifile.got_key_label("label", strval)) {
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 6542b84..91350c7 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -91,7 +91,10 @@ void JumpPoint::validate()
// info is const, core::Info::find returns a non-const pointer
core::Info *entity_info = core::Info::find(info());
if (!entity_info) {
- entity_info = new core::Info(core::Entity::infotype(), label().c_str());
+ std::string labelstr(zone()->label());
+ labelstr += ':';
+ labelstr.append(label());
+ entity_info = new core::Info(core::Entity::infotype(), labelstr.c_str());
set_info(entity_info);
}
entity_info->clear_text();