Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-30 16:00:49 +0000
committerStijn Buys <ingar@osirion.org>2008-07-30 16:00:49 +0000
commitd09a1be33a647aedc12ce5ddcb7ea4ee23a75c8c (patch)
tree8fe9d8778223e22e8c957b59c51bccabb98d2b94 /src/game/game.cc
parentad436de3a520fb2469dafe23afe03dd0afe8d189 (diff)
various minor issues: ESC closing chat, g_autolevel
Diffstat (limited to 'src/game/game.cc')
-rw-r--r--src/game/game.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game/game.cc b/src/game/game.cc
index e481c9f..83daa93 100644
--- a/src/game/game.cc
+++ b/src/game/game.cc
@@ -20,7 +20,7 @@
namespace game
{
-Game *this_game = 0;
+
ShipModel *default_shipmodel = 0;
core::Zone *default_zone = 0;
@@ -183,15 +183,19 @@ void func_jump(core::Player *player, std::string const &args)
player->set_zone(zone);
}
-/*----- Game ------------------------------------------------------ */
+/* ---- The Game class --------------------------------------------- */
+
+Game *Game::game_instance = 0;
Game::Game() : core::Module("Project::OSiRiON")
{
- this_game = this;
+ game_instance = this;
+ g_autolevel = 0;
}
Game::~Game()
{
+ game_instance = 0;
}
void Game::init()
@@ -227,8 +231,8 @@ void Game::init()
func = core::Func::add("list_ship", (core::FuncPtr) func_list_ship);
func->set_info("list ship statistics");
- // set game variables
- core::Cvar::set("g_impulsespeed", "10.0f", core::Cvar::Game);
+ g_autolevel = core::Cvar::get("g_autolevel", "1", core::Cvar::Game | core::Cvar::Archive);
+ g_autolevel->set_info("[bool] enable or disale experimental autolevelling");
// indicate the module is ready to run frames
module_running = true;
@@ -236,6 +240,7 @@ void Game::init()
void Game::shutdown()
{
+ g_autolevel = 0;
// game functions are automaticly removed
// remove engine core functions