From a877b28e7f4942b8feec9a4960aec66b2a2d6c6b Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 29 Jul 2011 21:06:04 +0000 Subject: Corrected mass in the shipmodel info. --- src/game/base/shipmodel.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/game/base') 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(""); -- cgit v1.2.3