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>2012-02-15 19:06:01 +0000
committerStijn Buys <ingar@osirion.org>2012-02-15 19:06:01 +0000
commitf5d5dab22cca6adc7c92025ad4117e03365e3937 (patch)
treecc68d2921df83195df3a70b7e1eff84c7048ff1c /src
parenta97ecc7538f73b3a2b83542d495bbeb30360aa27 (diff)
Adjusted map target modelview scaling, fixed a crash when targetting an entity without model.
Diffstat (limited to 'src')
-rw-r--r--src/client/mapwindow.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/mapwindow.cc b/src/client/mapwindow.cc
index ffc777e..ed88f88 100644
--- a/src/client/mapwindow.cc
+++ b/src/client/mapwindow.cc
@@ -183,6 +183,8 @@ void MapWindow::set_target(const core::Entity *entity) {
mapwindow_modelview->set_mode(ui::ModelView::Model);
mapwindow_modelview->set_modelname(mapwindow_target->model()->name());
mapwindow_modelview->set_colors(mapwindow_target->color(), mapwindow_target->color_second());
+ mapwindow_modelview->set_zoom(2.5f);
+ mapwindow_modelview->set_radius(2.0f);
} else if (mapwindow_target->type() == core::Entity::Globe) {
mapwindow_modelview->set_mode(ui::ModelView::Globe);
@@ -193,9 +195,15 @@ void MapWindow::set_target(const core::Entity *entity) {
globe->flag_is_set(core::Entity::Bright),
globe->coronaname()
);
+ mapwindow_modelview->set_zoom(2.5f);
+ if (globe->flag_is_set(core::Entity::Bright))
+ mapwindow_modelview->set_radius(0.5f);
+ else
+ mapwindow_modelview->set_radius(1.0f);
} else {
mapwindow_modelview->set_mode(ui::ModelView::Model);
- mapwindow_modelview->set_modelname(0);
+ const std::string empty;
+ mapwindow_modelview->set_modelname(empty);
}
mapwindow_modelview->show();