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>2010-11-12 14:43:49 +0000
committerStijn Buys <ingar@osirion.org>2010-11-12 14:43:49 +0000
commitc0c2a0ccc335b00983bf69b99b7a44505ed24b47 (patch)
treeaed98bf43957595104810e6ba7d1ab278d2e8089 /src/game
parentd07d7e0d0ba022d555f418e9a072d71c190ed225 (diff)
made core::Entity::entity_shape a private attribute
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/jumppoint.cc2
-rw-r--r--src/game/base/navpoint.cc2
-rw-r--r--src/game/example/example.cc8
-rw-r--r--src/game/example/spectator.cc2
-rw-r--r--src/game/intro/convoy.cc4
-rw-r--r--src/game/intro/intro.cc2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 5b9a75f..82ed489 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -14,7 +14,7 @@ namespace game
JumpPoint::JumpPoint() : core::EntityDynamic()
{
- entity_shape = core::Entity::Diamond;
+ set_shape(core::Entity::Diamond);
get_color().assign(0.0f, 0.8f, 0.8f, 1.0f);
get_color_second().assign(0.6f, 1.0f);
set_radius(0.25f);
diff --git a/src/game/base/navpoint.cc b/src/game/base/navpoint.cc
index 2c76807..f7d6046 100644
--- a/src/game/base/navpoint.cc
+++ b/src/game/base/navpoint.cc
@@ -14,7 +14,7 @@ const Template *NavPoint::navpoint_template = 0;
NavPoint::NavPoint() : core::Entity()
{
- entity_shape = core::Entity::Diamond;
+ set_shape(core::Entity::Diamond);
get_color().assign(1.0f, 1.0f);
get_color_second().assign(0.6f, 1.0f);
set_radius(0.25f);
diff --git a/src/game/example/example.cc b/src/game/example/example.cc
index a6372da..7ad39b2 100644
--- a/src/game/example/example.cc
+++ b/src/game/example/example.cc
@@ -43,7 +43,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *cube = new core::Entity(); // a new entity
cube->set_label("cube");
cube->set_name("The Red Cube");
- cube->entity_shape = core::Entity::Cube; // set the shape to cube
+ cube->set_shape(core::Entity::Cube); // set the shape to cube
cube->get_location().assign(16, -8, 0); // set location
cube->get_color().assign(1, 0, 0); // set RGB color red
cube->set_radius(0.25f); // set radius, in game units
@@ -52,7 +52,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *sphere = new core::Entity(); // a new entity
sphere->set_label("sphere");
sphere->set_name("The Green Sphere");
- sphere->entity_shape = core::Entity::Sphere; // set the shape to sphere
+ sphere->set_shape(core::Entity::Sphere); // set the shape to sphere
sphere->get_location().assign(16, 0, 0); // set location
sphere->get_color().assign(0, 1, 0); // set RGB color green
cube->set_radius(0.25f); // set radius, in game units
@@ -61,7 +61,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *diamond = new core::Entity(); // a new entity
diamond->set_label("diamond");
diamond->set_name("The Blue Diamond");
- diamond->entity_shape = core::Entity::Diamond; // set the shape to cube
+ diamond->set_shape(core::Entity::Diamond); // set the shape to cube
diamond->get_location().assign(16, 8, 0); // set location
diamond->get_color().assign(0, 0, 1); // set RGB color blue
cube->set_radius(0.25f); // set radius, in game units
@@ -70,7 +70,7 @@ Example::Example() : core::Module("The Osirion Project Example", true)
core::Entity *axis = new core::Entity(); // a new entity
axis->set_label("origin");
axis->set_name("The Origin");
- axis->entity_shape = core::Entity::Axis; // set the shape to axis
+ axis->set_shape(core::Entity::Axis); // set the shape to axis
axis->get_location().assign(0, 0, 0); // set location
axis->get_color().assign(1); // set greyscale color white
axis->get_color_second().assign(0.5f, 0.0f, 0.5f); // set RGB secondary color
diff --git a/src/game/example/spectator.cc b/src/game/example/spectator.cc
index defc356..5fc7fc6 100644
--- a/src/game/example/spectator.cc
+++ b/src/game/example/spectator.cc
@@ -15,7 +15,7 @@ core::Cvar *Spectator::g_spectatorrotation = 0;
Spectator::Spectator(core::Player *owner) : core::EntityControlable()
{
// default properties
- entity_shape = core::Entity::Diamond;
+ set_shape(core::Entity::Diamond);
set_radius(0.25f);
// the spectator gets player color
diff --git a/src/game/intro/convoy.cc b/src/game/intro/convoy.cc
index b037b0b..f69dd13 100644
--- a/src/game/intro/convoy.cc
+++ b/src/game/intro/convoy.cc
@@ -42,7 +42,7 @@ Convoy::Convoy(core::Zone *zone) : core::EntityDynamic()
set_label("convoy");
set_name("Convoy");
- entity_speed = 1.0f;
+ set_speed(1.0f);
set_serverside();
}
@@ -67,7 +67,7 @@ void Convoy::add(const std::string &model)
member->get_color_second().assign(color_second());
member->entity_thrust = 1.0f;
- member->entity_speed = speed();
+ member->set_speed(speed());
member->get_location().assign(location());
d = ((float) convoy_members.size()) * 0.5f;
diff --git a/src/game/intro/intro.cc b/src/game/intro/intro.cc
index 8d5577b..2147d02 100644
--- a/src/game/intro/intro.cc
+++ b/src/game/intro/intro.cc
@@ -111,7 +111,7 @@ bool Intro::load_world()
convoy->get_axis().change_direction(f);
} else if (ini.got_key_float("speed", f)) {
- convoy->entity_speed = f;
+ convoy->set_speed(f);
} else if (ini.got_key_string("ship", strval)) {
convoy->add(strval);