Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-07-29 21:06:04 +0000
committerStijn Buys <ingar@osirion.org>2011-07-29 21:06:04 +0000
commita877b28e7f4942b8feec9a4960aec66b2a2d6c6b (patch)
tree72dea49f9b83f9d737b572f7e776dfceb521230a /src
parent11c897f3948c0b4864526e2671874fd662f85688 (diff)
Corrected mass in the shipmodel info.
Diffstat (limited to 'src')
-rw-r--r--src/game/base/shipmodel.cc12
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("");