[Quake2world-dev] r317 - quake2world/trunk/src

jdolan at jdolan.dyndns.org jdolan at jdolan.dyndns.org
Sat Mar 28 02:21:26 UTC 2009


Author: jdolan
Date: 2009-03-28 02:21:25 +0000 (Sat, 28 Mar 2009)
New Revision: 317

Modified:
   quake2world/trunk/src/cl_screen.c
   quake2world/trunk/src/cl_view.c
   quake2world/trunk/src/r_lightmap.c
Log:
Allow people to scale 3rd person camera offset with cl_thirdperson.

Modified: quake2world/trunk/src/cl_screen.c
===================================================================
--- quake2world/trunk/src/cl_screen.c	2009-03-27 17:02:43 UTC (rev 316)
+++ quake2world/trunk/src/cl_screen.c	2009-03-28 02:21:25 UTC (rev 317)
@@ -525,7 +525,7 @@
 	glColor4ubv(crosshair.color);
 
 	// adjust the crosshair for 3rd person perspective
-	offset = cl_thirdperson->value ? 0.01 * r_view.height : 0;
+	offset = cl_thirdperson->value * 0.008 * r_view.height;
 
 	// calculate width and height based on crosshair image and scale
 	w = (r_view.width - crosshair.width * cl_crosshairscale->value) / 2;

Modified: quake2world/trunk/src/cl_view.c
===================================================================
--- quake2world/trunk/src/cl_view.c	2009-03-27 17:02:43 UTC (rev 316)
+++ quake2world/trunk/src/cl_view.c	2009-03-28 02:21:25 UTC (rev 317)
@@ -238,7 +238,7 @@
 	AngleVectors(r_view.angles, forward, NULL, NULL);
 
 	// project the view origin back and up for 3rd person
-	VectorMA(r_view.origin, -80, forward, dest);
+	VectorMA(r_view.origin, -80.0 * cl_thirdperson->value, forward, dest);
 	dest[2] += 20;
 
 	// clip it to the world

Modified: quake2world/trunk/src/r_lightmap.c
===================================================================
--- quake2world/trunk/src/r_lightmap.c	2009-03-27 17:02:43 UTC (rev 316)
+++ quake2world/trunk/src/r_lightmap.c	2009-03-28 02:21:25 UTC (rev 317)
@@ -514,6 +514,11 @@
 			VectorCopy(l->org, lighting->positions[0]);
 		}
 	}
+
+	// if we've changed light sources, force a long lerp
+	if(!VectorCompare(lighting->positions[0], lighting->positions[1])){
+		VectorMix(lighting->positions[0], lighting->positions[1], 0.5, lighting->positions[0]);
+	}
 }
 
 



More information about the Quake2World-dev mailing list