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/game.cc')
-rw-r--r--src/game/base/game.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index c171711..7ed01e1 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -461,6 +461,7 @@ void Game::func_specs(core::Player *player, const std::string &args)
con_print << " ^Nradius = ^B" << ship->radius() << std::endl;
con_print << " ^Ncargo = ^B" << ship->inventory()->capacity() << std::endl;
con_print << "Engines:" << std::endl;
+ con_print << " ^Ndamping = ^B" << ship->body()->getLinearDamping() << " " << ship->body()->getAngularDamping() << std::endl;
con_print << " ^Nthrust = ^B" << ship->thrust_force() << std::endl;
con_print << " ^Nimpulse = ^B" << ship->impulse_force() << std::endl;
con_print << " ^Nstrafe = ^B" << ship->strafe_force() << std::endl;
@@ -502,6 +503,13 @@ void Game::func_specs(core::Player *player, const std::string &args)
} else if (str.compare("roll") == 0) {
ship->set_roll_force(value);
msgstr << "Ship roll force set to " << value;
+
+ } else if (str.compare("damping") == 0) {
+ float a;
+ if (!(is >> a)) {
+ a = value;
+ }
+ ship->body()->setDamping(value, a);
} else {
msgstr << "^WUnknown ship engine specification '" << str << "'";