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>2012-10-14 21:27:21 +0000
committerStijn Buys <ingar@osirion.org>2012-10-14 21:27:21 +0000
commit47f64f234670f2947f972bdb5d514d8c1e10a7cc (patch)
tree0622e5cdf6f6d5c70123cc0a6500641e1ed83282 /src/game/base
parent9a3362033391657bd86a45952bf3a8ef6ec7b349 (diff)
Improved Jumppoint::validate() warning messages.
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/jumppoint.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 91350c7..eb3d6c2 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -49,13 +49,16 @@ void JumpPoint::validate()
{
jumppoint_target = 0;
+ if (targetlabel().size() == 0)
+ return;
+
if (targetlabel().size() < 3) {
- con_warn << " Jumppoint with invalid target label '" << targetlabel() << "'\n";
+ con_warn << " Jumppoint '" << label() << "'with invalid target '" << targetlabel() << "'\n";
return;
}
size_t pos = targetlabel().find(':');
if ((pos == std::string::npos) || (pos < 1) || (pos >= (targetlabel().size() - 1))) {
- con_warn << " Jumppoint with invalid target label '" << targetlabel() << "'\n";
+ con_warn << " Jumppoint '" << label() << "'with invalid target '" << targetlabel() << "'\n";
return;
}
@@ -64,18 +67,18 @@ void JumpPoint::validate()
core::Zone *targetzone = core::Zone::find(zonelabel);
if (!targetzone) {
- con_warn << " Jumppoint with invalid target zone '" << zonelabel << "'\n";
+ con_warn << " Jumppoint '" << label() << "'with invalid target zone '" << zonelabel << "'\n";
return;
}
core::Entity *targetentity = targetzone->find_entity(entitylabel);
if (!targetentity) {
- con_warn << " Could not find target jumppoint '" << entitylabel << "' in zone '" << zonelabel << "'\n";
+ con_warn << " Jumppoint '" << label() << "'with unknown target '" << entitylabel << "' in zone '" << zonelabel << "'\n";
return;
}
if ((targetentity->moduletype() != jumppoint_enttype) && (targetentity->moduletype() != jumpgate_enttype)) {
- con_warn << " Jumppoint with invalid target jumppoint '" << entitylabel << "' in zone '" << zonelabel << "'\n";
+ con_warn << " Jumppoint '" << label() << "'with invalid target '" << entitylabel << "' in zone '" << zonelabel << "'\n";
return;
}