diff options
-rw-r--r-- | src/game/base/jumppoint.cc | 13 |
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; } |