diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2011-01-23 21:50:43 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:53 +0000 |
commit | 79c4a4da68b6de0f8e58eb7191b18bf35402c2f6 (patch) | |
tree | 50488cc63addbd3bfed8566a8fe7bb37f97df44e /src/game/bg_pmove.c | |
parent | 1d693fb13d2d664d7c85aacdb1dee47b617b5fd3 (diff) |
* Fix the "light bug" where wallwalking over small bumps on the ceiling (such as lights) could cause you to invert. Special thanks to PhilH, Odin, Roman Tetelman, Timbo, Khalsa, and Lava_Croft for help in nailing it down and/or trying to help me do so.
Diffstat (limited to 'src/game/bg_pmove.c')
-rw-r--r-- | src/game/bg_pmove.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 0c29d55d..b1bccec2 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2139,7 +2139,9 @@ static void PM_GroundClimbTrace( void ) pm->ps->eFlags |= EF_WALLCLIMB; //if we're not stuck to the ceiling then set grapplePoint to be a surface normal - if( !VectorCompare( trace.plane.normal, ceilingNormal ) ) + //use VectorCompareEpsilon here to prevent a bug where differences in fp precision + //lead to taking crossproducts that give all-zero normals + if( !VectorCompareEpsilon( trace.plane.normal, ceilingNormal, .000001f ) ) { //so we know what surface we're stuck to VectorCopy( trace.plane.normal, pm->ps->grapplePoint ); |