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-11-15 19:24:55 +0000
committerStijn Buys <ingar@osirion.org>2008-11-15 19:24:55 +0000
commit28ba97bdd8fb6ca352dc49dba01a66bd155ad523 (patch)
treeeb4abd0505eb842e15201783529814bda1ae6e76 /src/render/camera.cc
parent1f0dbeeabdffff096908473168898c5fa63bcff0 (diff)
entity extensions
Diffstat (limited to 'src/render/camera.cc')
-rw-r--r--src/render/camera.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/render/camera.cc b/src/render/camera.cc
index 875b147..c136375 100644
--- a/src/render/camera.cc
+++ b/src/render/camera.cc
@@ -98,10 +98,7 @@ void Camera::set_mode(Mode newmode) {
// switch camera to Track mode
camera_mode = Track;
if (core::localcontrol()) {
- if (core::localcontrol()->state())
- camera_axis.assign(core::localcontrol()->state()->axis());
- else
- camera_axis.assign(core::localcontrol()->axis());
+ camera_axis.assign(core::localcontrol()->axis());
}
break;
@@ -242,8 +239,8 @@ void Camera::frame(float seconds)
}
} else {
- camera_target.assign(core::localcontrol()->state()->location());
- target_axis.assign(core::localcontrol()->state()->axis());
+ camera_target.assign(core::localcontrol()->location());
+ target_axis.assign(core::localcontrol()->axis());
distance = core::localcontrol()->radius();
if (mode() == Track) {
@@ -306,14 +303,12 @@ void Camera::frame(float seconds)
camera_axis.assign(target_axis);
- if (core::localcontrol()->state()) {
- if (core::localcontrol()->model()) {
- camera_target += (core::localcontrol()->model()->maxbbox().x+0.05) *
- core::localcontrol()->state()->axis().forward();
- } else {
- camera_target += (core::localcontrol()->radius() + 0.05) *
- core::localcontrol()->state()->axis().forward();
- }
+ if (core::localcontrol()->model()) {
+ camera_target += (core::localcontrol()->model()->maxbbox().x+0.05) *
+ core::localcontrol()->axis().forward();
+ } else {
+ camera_target += (core::localcontrol()->radius() + 0.05) *
+ core::localcontrol()->axis().forward();
}
distance = 0.0f;
}