[SCM] Quake 3 engine branch, master, updated. debian/1.36+svn1802-2+dbg-12-ga1a81c1

Simon McVittie smcv at debian.org
Sat Feb 5 22:33:49 UTC 2011


The following commit has been merged in the master branch:
commit d61311106727ebe1c55725cc9efd942da8954741
Author: Simon McVittie <smcv at debian.org>
Date:   Fri Feb 4 20:18:08 2011 +0000

    Replace patch 0004 with the simpler upstream fix

diff --git a/debian/changelog b/debian/changelog
index de178c6..c7fdfa7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 ioquake3 (1.36+svn1802-3) UNRELEASED; urgency=low
 
   * Mark some patches as applied upstream
+  * Replace patch 0004 with the simpler upstream fix
 
  -- Simon McVittie <smcv at debian.org>  Fri, 04 Feb 2011 20:15:33 +0000
 
diff --git a/debian/patches/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch b/debian/patches/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch
index 66a9f53..3b10eef 100644
--- a/debian/patches/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch
+++ b/debian/patches/0004-Clip-cl_mouseAccelOffset-at-0.001-to-avoid-division-.patch
@@ -1,49 +1,24 @@
-From: Simon McVittie <smcv at debian.org>
-Date: Sun, 1 Aug 2010 11:26:51 +0100
-Subject: [PATCH] Clip cl_mouseAccelOffset at 0.001 to avoid division by zero
+From 276125d95bcbebd38d5a64a449b1805252f463cc Mon Sep 17 00:00:00 2001
+From: Thilo Schulz <thilo>
+Date: Fri, 4 Feb 2011 17:16:53 +0000
+Subject: [PATCH] Fix division by zero, reported by Simon McVittie
 
-Origin: vendor, Debian
 Bug: http://bugzilla.icculus.org/show_bug.cgi?id=4691
-Forwarded: yes
+Origin: upstream, commit:1852
 ---
- code/client/cl_input.c |   16 ++++++++++++----
- 1 files changed, 12 insertions(+), 4 deletions(-)
+ code/client/cl_main.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
 
-diff --git a/code/client/cl_input.c b/code/client/cl_input.c
-index a42030d..5549448 100644
---- a/code/client/cl_input.c
-+++ b/code/client/cl_input.c
-@@ -477,8 +477,16 @@ void CL_MouseMove(usercmd_t *cmd)
- 		}
- 		else
- 		{
-+#			define CL_MOUSEACCELOFFSET_MIN 1.0e-3f
- 			float rate[2];
- 			float power[2];
-+			float offset = cl_mouseAccelOffset->value;
-+
-+			// clip at a small positive number to avoid division
-+			// by zero (or indeed going backwards!)
-+			if (offset < CL_MOUSEACCELOFFSET_MIN) {
-+				offset = CL_MOUSEACCELOFFSET_MIN;
-+			}
+diff --git a/code/client/cl_main.c b/code/client/cl_main.c
+index 770f718..2dbf585 100644
+--- a/code/client/cl_main.c
++++ b/code/client/cl_main.c
+@@ -3127,6 +3127,7 @@ void CL_Init( void ) {
+ 	// offset for the power function (for style 1, ignored otherwise)
+ 	// this should be set to the max rate value
+ 	cl_mouseAccelOffset = Cvar_Get( "cl_mouseAccelOffset", "5", CVAR_ARCHIVE );
++	Cvar_CheckRange(cl_mouseAccelOffset, 0.001, 50000.0, qfalse);
  
- 			// sensitivity remains pretty much unchanged at low speeds
- 			// cl_mouseAccel is a power value to how the acceleration is shaped
-@@ -487,11 +495,11 @@ void CL_MouseMove(usercmd_t *cmd)
+ 	cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
  
- 			rate[0] = fabs(mx) / (float) frame_msec;
- 			rate[1] = fabs(my) / (float) frame_msec;
--			power[0] = powf(rate[0] / cl_mouseAccelOffset->value, cl_mouseAccel->value);
--			power[1] = powf(rate[1] / cl_mouseAccelOffset->value, cl_mouseAccel->value);
-+			power[0] = powf(rate[0] / offset, cl_mouseAccel->value);
-+			power[1] = powf(rate[1] / offset, cl_mouseAccel->value);
- 
--			mx = cl_sensitivity->value * (mx + ((mx < 0) ? -power[0] : power[0]) * cl_mouseAccelOffset->value);
--			my = cl_sensitivity->value * (my + ((my < 0) ? -power[1] : power[1]) * cl_mouseAccelOffset->value);
-+			mx = cl_sensitivity->value * (mx + ((mx < 0) ? -power[0] : power[0]) * offset);
-+			my = cl_sensitivity->value * (my + ((my < 0) ? -power[1] : power[1]) * offset);
- 
- 			if(cl_showMouseRate->integer)
- 				Com_Printf("ratex: %f, ratey: %f, powx: %f, powy: %f\n", rate[0], rate[1], power[0], power[1]);
 -- 

-- 
Quake 3 engine



More information about the Pkg-games-commits mailing list