Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 325 vs 326 for /trunk/Source Code/Rendering/Camera/Camera.cpp

Diff revisions: vs.
  @@ -4,7 +4,7 @@
4 4 #include "Managers/Headers/SceneManager.h"
5 5
6 6 namespace Divide {
7 -
7 +
8 8 Camera::Camera(const CameraType& type, const vec3<F32>& eye) :
9 9 Resource("temp_camera"),
10 10 _isActive(false),
  @@ -66,16 +66,17 @@
66 66
67 67 void Camera::update(const U64 deltaTime) {
68 68
69 - #if USE_FIXED_TIMESTEP
70 - static const U64 SKIP_TICKS = (1000 * 1000) / Config::TICKS_PER_SECOND;
71 - F32 timeFactor = getUsToSec(SKIP_TICKS);
72 - #else
73 - F32 timeFactor = getUsToSec(deltaTime);
74 - #endif
75 -
76 - _cameraMoveSpeed = _moveSpeedFactor * timeFactor;
77 - _cameraTurnSpeed = _turnSpeedFactor * timeFactor;
78 - _cameraZoomSpeed = _zoomSpeedFactor * timeFactor;
69 + if (Config::USE_FIXED_TIMESTEP) {
70 + F32 timeFactor = getUsToSec(Config::SKIP_TICKS);
71 + _cameraMoveSpeed = _moveSpeedFactor * timeFactor;
72 + _cameraTurnSpeed = _turnSpeedFactor * timeFactor;
73 + _cameraZoomSpeed = _zoomSpeedFactor * timeFactor;
74 + } else {
75 + F32 timeFactor = getUsToSec(deltaTime);
76 + _cameraMoveSpeed = _moveSpeedFactor * timeFactor;
77 + _cameraTurnSpeed = _turnSpeedFactor * timeFactor;
78 + _cameraZoomSpeed = _zoomSpeedFactor * timeFactor;
79 + }
79 80 }
80 81
81 82 void Camera::updateProjection(bool force){