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>2011-07-12 13:03:01 +0000
committerStijn Buys <ingar@osirion.org>2011-07-12 13:03:01 +0000
commitae3127e1f98b74bab9b40ed774d4a520507a325b (patch)
treee545fc3753ff47b21104deeeb334df7df3746fda /src/game/base/ship.cc
parent537aa0dcb38e400ae1fcc9c23023d37484191c4c (diff)
Save and load player inventories,
corrected a typo in saving the forward vector of the ship axis.
Diffstat (limited to 'src/game/base/ship.cc')
-rw-r--r--src/game/base/ship.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 0bc1b7c..459b8fd 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -299,20 +299,22 @@ void Ship::set_state(int state)
if (state != core::Entity::Docked)
ship_dock = 0;
}
+
void Ship::set_dock(core::Entity *dock)
{
if (!dock)
return;
- ship_dock = dock;
get_location().assign(dock->location());
get_axis().assign(dock->axis());
+ ship_dock = dock;
set_state(core::Entity::Docked);
// if the dock is not owned by a player. set it as spawn
const core::Player *owner = (dock->type() == core::Entity::Controlable ? static_cast<core::EntityControlable *>(dock)->owner() : 0 );
if (!owner)
set_spawn(dock);
+
reset();
}