From: lordhavoc Date: Fri, 2 Nov 2001 10:52:41 +0000 (+0000) Subject: possible improvement to keep camera out of walls (still ends up in a wall occasionall... X-Git-Tag: RELEASE_0_2_0_RC1~744 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2267bf64ec275a07d1b3da810bce31abff6c763;p=xonotic%2Fdarkplaces.git possible improvement to keep camera out of walls (still ends up in a wall occasionally, just less often) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@998 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/chase.c b/chase.c index 22c82aac..4633565e 100644 --- a/chase.c +++ b/chase.c @@ -67,9 +67,9 @@ void Chase_Update (void) chase_dest[2] = r_refdef.vieworg[2] + forward[2] * dist + chase_up.value; TraceLine (r_refdef.vieworg, chase_dest, stop, normal); - chase_dest[0] = stop[0] + forward[0] * 8; - chase_dest[1] = stop[1] + forward[1] * 8; - chase_dest[2] = stop[2] + forward[2] * 8; + chase_dest[0] = stop[0] + forward[0] * 8 + normal[0] * 4; + chase_dest[1] = stop[1] + forward[1] * 8 + normal[1] * 4; + chase_dest[2] = stop[2] + forward[2] * 8 + normal[2] * 4; VectorCopy (chase_dest, r_refdef.vieworg); }