From 1032161366da1b2153de8d804465061e6bcc4fce Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 17 Oct 2010 21:25:27 +0000 Subject: moved bullet objets to core::Entity, moved docking functions to game.cc and removed entity->dock(), enabled depth testing for bullet debug draw --- src/game/base/station.cc | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/game/base/station.cc') diff --git a/src/game/base/station.cc b/src/game/base/station.cc index f5dc50a..0d992bd 100644 --- a/src/game/base/station.cc +++ b/src/game/base/station.cc @@ -22,26 +22,4 @@ Station::~Station() { } -void Station::dock(core::Entity *entity) -{ - if (entity->moduletype() != ship_enttype) - return; - - Ship * ship = static_cast(entity); - - if (math::distance(location(), ship->location()) > radius() + ship->radius()) { - if (ship->owner()) - ship->owner()->send("Target 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()); - } -} - } -- cgit v1.2.3