Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/ship.cc')
-rw-r--r--src/game/base/ship.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 3e4db42..214d234 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -157,6 +157,7 @@ void Ship::func_jump(std::string const &args)
return;
} else {
+
if (!jumpdrive() && !Game::g_devel->value()) {
owner()->send("This ship is not equiped with a hyperspace drive!");
return;
@@ -171,19 +172,18 @@ void Ship::func_jump(std::string const &args)
entity_eventstate = core::Entity::Normal;
return;
}
-
initiate_jump(find_closest_jumppoint());
}
}
JumpPoint * Ship::find_closest_jumppoint()
{
- // find closest jumppoint
+ // find closest jumpgate or jumppoint
float d = -1;
JumpPoint *jumppoint = 0;
for (core::Zone::Content::iterator it = zone()->content().begin(); it != zone()->content().end(); it++) {
core::Entity *entity = (*it);
- if (entity->moduletype() == jumppoint_enttype) {
+ if ((entity->moduletype() == jumppoint_enttype) || (entity->moduletype() == jumpgate_enttype)) {
JumpPoint *te = static_cast<JumpPoint *>(entity);
float d1 = math::distance(location(), te->location());
if ((d < 0) || (d1 < d)) {