Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/camera.cc20
-rw-r--r--src/render/draw.cc7
-rw-r--r--src/render/dust.cc2
3 files changed, 11 insertions, 18 deletions
diff --git a/src/render/camera.cc b/src/render/camera.cc
index 8fe84a7..507a81f 100644
--- a/src/render/camera.cc
+++ b/src/render/camera.cc
@@ -173,19 +173,9 @@ void Camera::frame(float seconds)
if (mode() == Overview)
set_mode(Track);
- if (core::localcontrol()->state()) {
- camera_target.assign(core::localcontrol()->state()->location());
- target_axis.assign(core::localcontrol()->state()->axis());
- } else {
- camera_target.assign(core::localcontrol()->location());
- target_axis.assign(core::localcontrol()->axis());
- }
-
- if (core::localcontrol()->model()) {
- distance = core::localcontrol()->model()->radius();
- } else {
- distance = 1.0f;
- }
+ camera_target.assign(core::localcontrol()->state()->location());
+ target_axis.assign(core::localcontrol()->state()->axis());
+ distance = core::localcontrol()->radius();
if (mode() == Track) {
float cosangle;
@@ -326,12 +316,14 @@ void Camera::draw()
math::Matrix4f matrix;
matrix.assign(camera_axis);
gl::multmatrix(matrix.transpose());
-
+/*
// match the camera with the current target
gl::translate(-1.0f * camera_target);
// apply camera offset
gl::translate(distance * camera_axis.forward());
+*/
+ gl::translate(-1.0f * camera_eye);
}
void Camera::set_direction(float direction)
diff --git a/src/render/draw.cc b/src/render/draw.cc
index 8855343..17dbdda 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -318,8 +318,7 @@ void pass_prepare(float seconds)
// load entity models and light flare textures
if (!entity->model() && entity->modelname().size()) {
entity->entity_model = model::Model::load(entity->modelname());
- entity->entity_radius = entity->model()->radius();
-
+
if (!entity->model()) {
entity->entity_modelname.clear();
entity->entity_radius = 0.25;
@@ -423,7 +422,8 @@ void pass_prepare(float seconds)
}
}
}
-
+
+ /*
// calculate screen position
if (entity->state()->visible()) {
GLdouble x = 0;
@@ -438,6 +438,7 @@ void pass_prepare(float seconds)
entity->state()->state_targetable = true;
}
}
+ */
}
}
diff --git a/src/render/dust.cc b/src/render/dust.cc
index 37dd217..05266e8 100644
--- a/src/render/dust.cc
+++ b/src/render/dust.cc
@@ -31,7 +31,7 @@ void Dust::init()
r_dust->set_info("[bool] render dust");
r_dustsize = core::Cvar::get("r_dustsize", "128", core::Cvar::Archive);
- r_dustsize->set_info("[bool] number of dust particles");
+ r_dustsize->set_info("[int] number of dust particles");
dust = 0;
dustsize = (size_t) r_dustsize->value();