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>2010-09-17 23:05:58 +0000
committerStijn Buys <ingar@osirion.org>2010-09-17 23:05:58 +0000
commita85c3ca1ff34775f2fc93013306dec21b34b0359 (patch)
treedc45be555858f53413d2477680247c8758b98d2a /src/game/base/planet.cc
parent417eeaa34b8374de18358cc64511d7298bc33756 (diff)
Initial inventory loading, ships docking ships
Diffstat (limited to 'src/game/base/planet.cc')
-rw-r--r--src/game/base/planet.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/base/planet.cc b/src/game/base/planet.cc
index 380ca02..ca213af 100644
--- a/src/game/base/planet.cc
+++ b/src/game/base/planet.cc
@@ -49,13 +49,14 @@ void Planet::dock(core::Entity *entity)
Ship * ship = static_cast<Ship *>(entity);
+ // fixed 50 km docking radius
if (math::distance(location(), ship->location()) > radius() + ship->radius() + 50.0f) {
if (ship->owner())
ship->owner()->send("Planet out of range");
return;
}
- ship->get_location().assign(entity->location());
+ ship->get_location().assign(location());
ship->set_state(core::Entity::Docked);
if (ship->owner() && ship->owner()->control() == ship) {