diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-18 01:35:05 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-18 01:35:05 +0000 |
| commit | a3714edde118763b4784c63f098700f10132653c (patch) | |
| tree | d6d1a74de9d75efbaf01c678ebbed37a7f0b14f1 /src/game | |
| parent | 944cd68addf377f794294391da6b291a41bc43f9 (diff) | |
| download | zcatch-a3714edde118763b4784c63f098700f10132653c.tar.gz zcatch-a3714edde118763b4784c63f098700f10132653c.zip | |
fixed so that the screen doesn't blank when you aim in the middle
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/client/gc_client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index 4ef64f87..48712e5d 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -868,7 +868,6 @@ void render_game() else { float l = length(mouse_pos); - if(l != l) l = 0; // detect division by zero if(l > mouse_max) { @@ -877,7 +876,8 @@ void render_game() } float offset_amount = max(l-deadzone, 0) * follow_factor; - camera_offset = normalize(mouse_pos)*offset_amount; + if(l > 0.0001f) // make sure that this isn't 0 + camera_offset = normalize(mouse_pos)*offset_amount; } } |