diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-11-23 18:01:39 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-11-23 18:01:39 +0000 |
commit | 3f0f134217531bd2f7d099f12e4ea77d3565cf91 (patch) | |
tree | 274f3849b8bbaa26bc2018db75bee9795bb3e3ce /source/gl_mesh.c | |
parent | 2479c40e2c820cb3e9eabe9e116148187f84d11a (diff) |
Added `com_uptime' macro.
Version string no longer overdraws long command line in console.
Cap `gl_celshading' value to 5 to prevent possible cheating.
Diffstat (limited to 'source/gl_mesh.c')
-rw-r--r-- | source/gl_mesh.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/gl_mesh.c b/source/gl_mesh.c index b6e6cb9..e42599d 100644 --- a/source/gl_mesh.c +++ b/source/gl_mesh.c @@ -289,6 +289,9 @@ void GL_DrawAliasModel( model_t *model ) { #if USE_CELSHADING scale = 0; if( gl_celshading->value > 0 && ( ent->flags & RF_SHELL_MASK ) == 0 ) { + if( gl_celshading->value > 5 ) { + cvar.Set( "gl_celshading", "5" ); + } VectorSubtract( origin, glr.fd.vieworg, dir ); scale = VectorLength( dir ); scale = 1.0f - scale / 700.0f; @@ -337,7 +340,7 @@ void GL_DrawAliasModel( model_t *model ) { qglVertexPointer( 3, GL_FLOAT, 16, tess.vertices ); last = model->meshes + model->numMeshes; - for( mesh = model->meshes; mesh != last; mesh++ ) { + for( mesh = model->meshes; mesh < last; mesh++ ) { if( ent->flags & RF_SHELL_MASK ) { image = r_whiteimage; } else { @@ -360,7 +363,7 @@ void GL_DrawAliasModel( model_t *model ) { } } - if( !( image->flags & if_paletted ) && ( image->flags & if_transparent ) ) { + if( ( image->flags & ( if_transparent|if_paletted ) ) == if_transparent ) { GL_Bits( bits | GLS_BLEND_BLEND ); } else { GL_Bits( bits ); @@ -416,6 +419,5 @@ void GL_DrawAliasModel( model_t *model ) { } qglPopMatrix(); - } |