Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-02-24 19:13:27 +0000
committerStijn Buys <ingar@osirion.org>2009-02-24 19:13:27 +0000
commit53faab4c1d692fed7c7ecfedea57fc457bf61e80 (patch)
treed5dab7709dd4dc5409ab0e62920bb4d62790a90a /src/game
parent0e96454c70e56de5cefa38ab1b5dc46196238d07 (diff)
Replaced 'The Osirion Project' with 'Project::OSiRioN' in messages,
added g_collision cflag to facillitate future development, added ShowOnMap entity flag
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/game.cc7
-rw-r--r--src/game/base/game.h3
-rw-r--r--src/game/base/jumppoint.cc2
-rw-r--r--src/game/base/navpoint.cc1
-rw-r--r--src/game/base/planet.cc2
-rw-r--r--src/game/base/star.cc2
-rw-r--r--src/game/base/station.cc1
7 files changed, 17 insertions, 1 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 23eee3f..29c36d6 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -52,6 +52,7 @@ core::Cvar *Game::g_impulsespeed = 0;
core::Cvar *Game::g_impulseacceleration = 0;
core::Cvar *Game::g_jumppointrange = 0;
core::Cvar *Game::g_devel = 0;
+core::Cvar *Game::g_collision = 0;
core::Module *factory()
{
@@ -307,6 +308,9 @@ Game::Game() : core::Module("Project::OSiRiON", true)
g_devel = core::Cvar::get("g_devel", "0", core::Cvar::Archive);
g_devel->set_info("[bool] enable or disable developer mode");
+
+ g_collision = core::Cvar::get("g_collision", "0", core::Cvar::Archive);
+ g_collision->set_info("[bool] enable or disable collision detection");
}
Game::~Game()
@@ -853,7 +857,8 @@ void Game::frame(float seconds)
// TODO check Module::frame() is execute before are Entity::frame()
// collision
- Collision::frame(seconds);
+ if (g_collision->value())
+ Collision::frame(seconds);
}
void Game::player_connect(core::Player *player)
diff --git a/src/game/base/game.h b/src/game/base/game.h
index 0ea0d37..2af71ef 100644
--- a/src/game/base/game.h
+++ b/src/game/base/game.h
@@ -74,6 +74,9 @@ public:
/// game variable: enable or disable development mode
static core::Cvar *g_devel;
+ /// game variable: enable or disable collision
+ static core::Cvar *g_collision;
+
private:
bool load_world();
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index e943c24..eb51b68 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -77,6 +77,8 @@ void JumpPoint::validate()
JumpGate::JumpGate() : JumpPoint()
{
unset_flag(core::Entity::Bright);
+ set_flag(core::Entity::ShowOnMap);
+
entity_radius = 1.0f;
entity_moduletypeid = jumpgate_enttype;
entity_eventstate = core::Entity::NoPower;
diff --git a/src/game/base/navpoint.cc b/src/game/base/navpoint.cc
index a8e44dc..2a7c876 100644
--- a/src/game/base/navpoint.cc
+++ b/src/game/base/navpoint.cc
@@ -12,6 +12,7 @@ namespace game
NavPoint::NavPoint() : core::Entity(core::Entity::Static | core::Entity::Bright)
{
+ set_flag(core::Entity::ShowOnMap);
entity_shape = core::Entity::Diamond;
entity_color.assign(1.0f, 1.0f);
entity_color_second.assign(0.6f, 1.0f);
diff --git a/src/game/base/planet.cc b/src/game/base/planet.cc
index 3bf719e..6bb1f59 100644
--- a/src/game/base/planet.cc
+++ b/src/game/base/planet.cc
@@ -12,6 +12,8 @@ namespace game {
Planet::Planet() : core::EntityGlobe(core::Entity::Static | core::Entity::Solid)
{
+ set_flag(core::Entity::ShowOnMap);
+
entity_color = math::Color(1,1,1,1); // white
entity_radius = 64; // 64 game units
diff --git a/src/game/base/star.cc b/src/game/base/star.cc
index b68b202..fa5dc32 100644
--- a/src/game/base/star.cc
+++ b/src/game/base/star.cc
@@ -12,6 +12,8 @@ namespace game {
Star::Star() : core::EntityGlobe(core::Entity::Static | core::Entity::Solid | core::Entity::Bright)
{
+ set_flag(core::Entity::ShowOnMap);
+
entity_color.assign(1,1,1,1);
entity_color_second.assign(1,1,1,1);
entity_radius = 96; // 96 game units
diff --git a/src/game/base/station.cc b/src/game/base/station.cc
index 0a959c3..d39f1c6 100644
--- a/src/game/base/station.cc
+++ b/src/game/base/station.cc
@@ -14,6 +14,7 @@ Station::Station() : Entity()
{
entity_moduletypeid = station_enttype;
set_flag(core::Entity::Dockable);
+ set_flag(core::Entity::ShowOnMap);
station_shipdealer = 0;
}