diff options
Diffstat (limited to 'src/game/client/components')
| -rw-r--r-- | src/game/client/components/camera.cpp | 4 | ||||
| -rw-r--r-- | src/game/client/components/controls.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/game/client/components/camera.cpp b/src/game/client/components/camera.cpp index a9727ccf..ba9aed46 100644 --- a/src/game/client/components/camera.cpp +++ b/src/game/client/components/camera.cpp @@ -20,9 +20,7 @@ void CAMERA::on_render() //vec2 center; zoom = 1.0f; - bool spectate = false; - - if(spectate) + if(gameclient.snap.spectate) center = gameclient.controls->mouse_pos; else { diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index 208cad5e..f693eb98 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -157,8 +157,6 @@ bool CONTROLS::on_mousemove(float x, float y) { mouse_pos += vec2(x, y); // TODO: ugly - bool spectate = false; - // float camera_max_distance = 200.0f; float follow_factor = config.cl_mouse_followfactor/100.0f; @@ -167,7 +165,7 @@ bool CONTROLS::on_mousemove(float x, float y) //vec2 camera_offset(0, 0); - if(spectate) + if(gameclient.snap.spectate) { if(mouse_pos.x < 200.0f) mouse_pos.x = 200.0f; if(mouse_pos.y < 200.0f) mouse_pos.y = 200.0f; |