Bug 4691 - cl_mouseAccelOffset 0 causes division by zero
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: PC Linux
: P3 minor
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2010-08-06 13:08 EDT by Simon McVittie
Modified: 2011-02-04 12:17:05 EST
1 user (show)

See Also:


Attachments
Clip cl_mouseAccelOffset at 0.001 to avoid division by zero (1.92 KB, patch)
2010-08-06 13:08 EDT, Simon McVittie

Description Simon McVittie 2010-08-06 13:08:26 EDT
Created attachment 2386 [details]
Clip cl_mouseAccelOffset at 0.001 to avoid division by zero

Setting cl_mouseAccelOffset to 0 will cause division by zero.

The modified ioquake3 included with OpenArena 0.8.5 has this change, which turns off acceleration entirely in that situation:

http://git.debian.org/?p=pkg-games/openarena.git;a=blob;f=debian/patches/0010-CL_MouseMove-some-sort-of-mouse-acceleration-tweak.patch;h=d8953df5f0eb9807c63571ce370e4fbf7f6d9b33;hb=master

However, a more targeted fix would be to clip ridiculous values of cl_mouseAccelOffset at a small nonzero value. I've attached a patch to do that.
Comment 1 Thilo Schulz 2011-02-04 12:17:05 EST
fixed r1852