diff options
author | Stijn Buys <ingar@osirion.org> | 2011-07-29 21:06:04 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-07-29 21:06:04 +0000 |
commit | a877b28e7f4942b8feec9a4960aec66b2a2d6c6b (patch) | |
tree | 72dea49f9b83f9d737b572f7e776dfceb521230a | |
parent | 11c897f3948c0b4864526e2671874fd662f85688 (diff) |
Corrected mass in the shipmodel info.
-rw-r--r-- | src/game/base/shipmodel.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc index ec3259d..b7fa7b0 100644 --- a/src/game/base/shipmodel.cc +++ b/src/game/base/shipmodel.cc @@ -136,6 +136,9 @@ bool ShipModel::init() inifile.unknown_error("unkown template '" + str + "'"); } else { shipmodel->set_template(entitytemplate); + if (entitytemplate->radius()) { + shipmodel->set_radius(entitytemplate->radius()); + } } } else { inifile.unknown_key(); @@ -221,6 +224,9 @@ ShipModel::~ShipModel() void ShipModel::generate_info() { + // default mass + set_mass(radius() * 100.0f); + //clear_text(); if (text().size()) @@ -236,11 +242,7 @@ void ShipModel::generate_info() add_text(str.str()); str.str(""); - str << "top speed: ^B" << 100.0f * maxspeed() << " ^Nmps"; - add_text(str.str()); - str.str(""); - - str << "mass: ^B" << mass() << " ^Nmetric tonnes"; + str << "mass: ^B" << mass() << " ^Nmetric tonnes"; add_text(str.str()); str.str(""); |