diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-17 21:25:27 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-17 21:25:27 +0000 |
commit | 1032161366da1b2153de8d804465061e6bcc4fce (patch) | |
tree | d9163c92c79791c9495e6d5f2944aea27c24e77f /src/game/base/planet.cc | |
parent | 31c4ff4ff080ea34389c60ba4edd268dc7f3c08a (diff) |
moved bullet objets to core::Entity,
moved docking functions to game.cc and removed entity->dock(),
enabled depth testing for bullet debug draw
Diffstat (limited to 'src/game/base/planet.cc')
-rw-r--r-- | src/game/base/planet.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/game/base/planet.cc b/src/game/base/planet.cc index 7a648db..1e280c7 100644 --- a/src/game/base/planet.cc +++ b/src/game/base/planet.cc @@ -30,27 +30,4 @@ Planet::~Planet() } -void Planet::dock(core::Entity *entity) -{ - if (entity->moduletype() != ship_enttype) - return; - - Ship * ship = static_cast<Ship *>(entity); - - // fixed 5 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(location()); - ship->set_state(core::Entity::Docked); - - if (ship->owner() && ship->owner()->control() == ship) { - ship->owner()->set_view(this); - ship->owner()->send("^BDocking at " + name()); - } -} - } // namespace game |