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')
-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("");