From 04522db8d540a264d3e136d38c693e8fa97bdabd Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 30 Nov 2008 16:06:59 +0000 Subject: realistic strafe speed, moved launch buttons to the top of the docking menu --- src/game/base/game.cc | 16 ++++++---------- src/game/base/game.h | 3 --- src/game/base/ship.cc | 2 +- 3 files changed, 7 insertions(+), 14 deletions(-) (limited to 'src/game') diff --git a/src/game/base/game.cc b/src/game/base/game.cc index cb3bcf0..50ec416 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -33,7 +33,6 @@ namespace game // game variables core::Cvar *Game::g_impulsespeed = 0; core::Cvar *Game::g_impulseacceleration = 0; -core::Cvar *Game::g_strafespeed = 0; core::Cvar *Game::g_jumppointrange = 0; core::Cvar *Game::g_devel = 0; @@ -318,9 +317,6 @@ Game::Game() : core::Module("Project::OSiRiON", true) g_impulseacceleration = core::Cvar::get("g_impulseacceleration", "5", core::Cvar::Game | core::Cvar::Archive); g_impulseacceleration->set_info("[float] acceleration of the impulse drive"); - g_strafespeed = core::Cvar::get("g_strafespeed", "0.01", core::Cvar::Game | core::Cvar::Archive); - g_strafespeed->set_info("[float] strafe speed"); - g_jumppointrange = core::Cvar::get("g_jumppointrange", "512", core::Cvar::Game | core::Cvar::Archive); g_jumppointrange->set_info("[float] jumppoint range"); @@ -707,6 +703,12 @@ bool Game::load_menus(core::Entity *entity, const std::string &menufilename) menu_main->set_text("Launch area"); entity->add_menu(menu_main); + button = new ButtonDescription(); + button->set_text("Launch"); + button->set_command("launch"); + button->set_alignment(ButtonDescription::Center); + menu_main->add_button(button); + if (menu_dealer) { button = new ButtonDescription(); button->set_text("Return"); @@ -723,12 +725,6 @@ bool Game::load_menus(core::Entity *entity, const std::string &menufilename) menu_main->add_button(button); } - button = new ButtonDescription(); - button->set_text("Launch"); - button->set_command("launch"); - button->set_alignment(ButtonDescription::Center); - menu_main->add_button(button); - if (inifile.is_open()) { size_t n = entity->menus().size(); con_debug << " " << inifile.name() << " " << n << " " << aux::plural("menu", n) << std::endl; diff --git a/src/game/base/game.h b/src/game/base/game.h index 6f4cffd..caeb50a 100644 --- a/src/game/base/game.h +++ b/src/game/base/game.h @@ -55,9 +55,6 @@ public: /// game variable: acceleration of the impulse drive static core::Cvar *g_impulseacceleration; - /// game variable strafe speed - static core::Cvar *g_strafespeed; - /// game variable: jumppoint range static core::Cvar *g_jumppointrange; diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index 5473581..3071bb7 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -485,7 +485,7 @@ void Ship::frame(float seconds) } if (fabs(current_target_strafe) > MIN_DELTA) { - entity_location += entity_axis.left() * (current_target_strafe * Game::g_strafespeed->value()); + entity_location += entity_axis.left() * (current_target_strafe * 0.15f * actual_maxspeed) * seconds; } entity_movement = target_thrust; -- cgit v1.2.3