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-06-08 16:02:52 +0000
committerStijn Buys <ingar@osirion.org>2008-06-08 16:02:52 +0000
commit513bfb8d9cf3c246dd15cf67b8a5ff9c7a6f9afe (patch)
treed3df60466c9ba4d577cd833223ba9147cfd268d4 /src/render
parent6582edea98876b8f5797429e76f8fc253f83747a (diff)
enable client prediction
Diffstat (limited to 'src/render')
-rw-r--r--src/render/camera.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/render/camera.cc b/src/render/camera.cc
index a879b82..7f1f307 100644
--- a/src/render/camera.cc
+++ b/src/render/camera.cc
@@ -181,7 +181,7 @@ void Camera::draw(float seconds)
camera_target.assign(core::localcontrol()->location());
target_axis.assign(core::localcontrol()->axis());
}
-
+
if (core::localcontrol()->model()) {
distance = core::localcontrol()->model()->radius();
} else {
@@ -193,7 +193,7 @@ void Camera::draw(float seconds)
float angle;
float side;
float u;
- const float cam_speed = seconds;
+ //const float camspeed = 90.0f * seconds; // 180 degrees per second
math::Vector3f n;
math::Vector3f p;
@@ -215,7 +215,7 @@ void Camera::draw(float seconds)
cosangle = math::dotproduct(p, camera_axis.up());
if (fabs(cosangle) + MIN_DELTA < 1 ) {
angle = acos(cosangle) * 180.0f / M_PI;
- angle = math::sgnf(side) * angle * cam_speed;
+ angle = math::sgnf(side) * angle * seconds;
camera_axis.change_pitch(-angle);
}
}
@@ -237,7 +237,7 @@ void Camera::draw(float seconds)
cosangle = math::dotproduct(p, camera_axis.forward());
if (fabs(cosangle) + MIN_DELTA < 1 ) {
angle = acos(cosangle) * 180.0f / M_PI;
- angle = math::sgnf(side) * angle * cam_speed;
+ angle = math::sgnf(side) * angle * seconds;
camera_axis.change_direction(angle);
}
}
@@ -259,16 +259,16 @@ void Camera::draw(float seconds)
cosangle = math::dotproduct(p, camera_axis.up());
if (fabs(cosangle) + MIN_DELTA < 1 ) {
angle = acos(cosangle) * 180.0f / M_PI;
- angle = math::sgnf(side) * angle * cam_speed;
+ angle = math::sgnf(side) * angle * seconds;
camera_axis.change_roll(angle);
}
}
- if (core::localcontrol()->model()) {
+/* if (core::localcontrol()->model()) {
camera_target -= (core::localcontrol()->model()->maxbbox().x + 0.1f) * camera_axis.forward();
camera_target += (core::localcontrol()->model()->maxbbox().z + 0.1f ) * camera_axis.up();
}
-
+*/
} else if (mode() == Free) {
camera_axis.assign(target_axis);