diff options
Diffstat (limited to 'src/game/g_utils.c')
-rw-r--r-- | src/game/g_utils.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/game/g_utils.c b/src/game/g_utils.c index 9caaba76..a3b2cb42 100644 --- a/src/game/g_utils.c +++ b/src/game/g_utils.c @@ -837,45 +837,3 @@ void G_CloseMenus( int clientNum ) Com_sprintf( buffer, 32, "serverclosemenus" ); trap_SendServerCommand( clientNum, buffer ); } - - -/* -================ -DebugLine - - debug polygons only work when running a local game - with r_debugSurface set to 2 -================ -*/ -int DebugLine( vec3_t start, vec3_t end, int color ) -{ - vec3_t points[ 4 ], dir, cross, up = { 0, 0, 1 }; - float dot; - - VectorCopy( start, points[ 0 ] ); - VectorCopy( start, points[ 1 ] ); - //points[1][2] -= 2; - VectorCopy( end, points[ 2 ] ); - //points[2][2] -= 2; - VectorCopy( end, points[ 3 ] ); - - - VectorSubtract( end, start, dir ); - VectorNormalize( dir ); - dot = DotProduct( dir, up ); - - if( dot > 0.99 || dot < -0.99 ) - VectorSet( cross, 1, 0, 0 ); - else - CrossProduct( dir, up, cross ); - - VectorNormalize( cross ); - - VectorMA(points[ 0 ], 2, cross, points[ 0 ] ); - VectorMA(points[ 1 ], -2, cross, points[ 1 ] ); - VectorMA(points[ 2 ], -2, cross, points[ 2 ] ); - VectorMA(points[ 3 ], 2, cross, points[ 3 ] ); - - return trap_DebugPolygonCreate( color, 4, points ); -} - |