Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.cc5
-rw-r--r--src/game/game.h2
-rw-r--r--src/game/ship.cc14
3 files changed, 16 insertions, 5 deletions
diff --git a/src/game/game.cc b/src/game/game.cc
index 5f754df..d0b4466 100644
--- a/src/game/game.cc
+++ b/src/game/game.cc
@@ -22,8 +22,6 @@
namespace game
{
-
-
ShipModel *default_shipmodel = 0;
core::Zone *default_zone = 0;
@@ -221,6 +219,9 @@ void Game::init()
g_impulseacceleration = core::Cvar::get("g_impulseacceleration", "4", core::Cvar::Game | core::Cvar::Archive);
g_impulseacceleration->set_info("[float] standard acceleration of the impulse drive");
+ g_devel = core::Cvar::get("g_devel", "0", core::Cvar::Archive);
+ g_devel->set_info("[bool] enable or disable developer mode");
+
// indicate the module is ready to run frames
module_running = true;
}
diff --git a/src/game/game.h b/src/game/game.h
index 36f7321..b9e6104 100644
--- a/src/game/game.h
+++ b/src/game/game.h
@@ -54,6 +54,8 @@ public:
core::Cvar *g_impulsespeed;
core::Cvar *g_impulseacceleration;
+ core::Cvar *g_devel;
+
private:
bool load_world();
diff --git a/src/game/ship.cc b/src/game/ship.cc
index 4ddd118..e46adc1 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -69,7 +69,11 @@ void Ship::impulse()
}
entity_eventstate = core::Entity::ImpulseInitiate;
- entity_timer = 3;
+ if (Game::instance()->g_devel->value()) {
+ entity_timer = 0;
+ } else {
+ entity_timer = 10;
+ }
ship_impulsedrive_timer = core::server()->time();
entity_dirty = true;
}
@@ -79,7 +83,7 @@ void Ship::impulse()
void Ship::jump(std::string const &args)
{
- if (!jumpdrive()) {
+ if (!jumpdrive() && !Game::instance()->g_devel->value()) {
core::server()->send(owner(), "This ship is not equiped with a hyperspace drive!");
return;
@@ -124,7 +128,11 @@ void Ship::jump(std::string const &args)
}
entity_eventstate = core::Entity::JumpInitiate;
- entity_timer = 10;
+ if (Game::instance()->g_devel->value()) {
+ entity_timer = 0;
+ } else {
+ entity_timer = 10;
+ }
ship_jumpdrive_timer = core::server()->time();
entity_dirty = true;
}