]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/model.c
ported over the 1.5 branch version of q3map2 which is newer
[xonotic/netradiant.git] / tools / quake3 / q3map2 / model.c
index f303df75a7972d9d81467868b84e385823e6e518..4200368bbddb58b7df28205e3696b4d22d13a0bf 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/* -------------------------------------------------------------------------------
+
 Copyright (C) 1999-2007 id Software, Inc. and contributors.
 For a list of contributors, see the accompanying CONTRIBUTORS file.
 
@@ -322,7 +323,7 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                ds->lightmapScale = lightmapScale;
                
                /* force to meta? */
-               if( si != NULL && si->forceMeta )
+               if( (si != NULL && si->forceMeta) || (spawnFlags & 4) ) /* 3rd bit */
                        ds->type = SURFACE_FORCED_META;
                
                /* set particulars */
@@ -366,6 +367,7 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                        }
                        
                        /* normal texture coordinates */
+                       else
                        {
                                st = PicoGetSurfaceST( surface, 0, i );
                                dv->st[ 0 ] = st[ 0 ];
@@ -393,9 +395,6 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                /* set cel shader */
                ds->celShader = celShader;
                
-               /* finish surface */
-               FinishSurface( ds );
-               
                /* ydnar: giant hack land: generate clipping brushes for model triangles */
                if( si->clipModel || (spawnFlags & 2) ) /* 2nd bit */
                {
@@ -405,7 +404,8 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade
                        
                        
                        /* temp hack */
-                       if( (si->compileFlags & C_TRANSLUCENT) || !(si->compileFlags & C_SOLID) )
+                       if( !si->clipModel &&
+                               ((si->compileFlags & C_TRANSLUCENT) || !(si->compileFlags & C_SOLID)) )
                                continue;
                        
                        /* overflow check */