]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
support "none" in the _celshader key
authordivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 12 Jul 2009 17:39:51 +0000 (17:39 +0000)
committerdivverent <divverent@61c419a2-8eb2-4b30-bcec-8cead039b335>
Sun, 12 Jul 2009 17:39:51 +0000 (17:39 +0000)
git-svn-id: svn://svn.icculus.org/netradiant/trunk@384 61c419a2-8eb2-4b30-bcec-8cead039b335

tools/quake3/q3map2/map.c

index f29d7d62e0016c942d65c7a7e70c30080de6553a..54f54441e3a04fb28192e94e1215a35672cb11d9 100644 (file)
@@ -1585,12 +1585,19 @@ static qboolean ParseMapEntity( qboolean onlyLights )
                value = ValueForKey( &entities[ 0 ], "_celshader" );
        if( value[ 0 ] != '\0' )
        {
-               sprintf( shader, "textures/%s", value );
-               celShader = ShaderInfoForShader( shader );
-               Sys_Printf( "Entity %d (%s) has cel shader %s\n", mapEnt->mapEntityNum, classname, celShader->shader );
+               if(strcmp(value, "none"))
+               {
+                       sprintf( shader, "textures/%s", value );
+                       celShader = ShaderInfoForShader( shader );
+                       Sys_Printf( "Entity %d (%s) has cel shader %s\n", mapEnt->mapEntityNum, classname, celShader->shader );
+               }
+               else
+               {
+                       celShader = NULL;
+               }
        }
        else
-               celShader = *globalCelShader ? ShaderInfoForShader(globalCelShader) : NULL;
+               celShader = (*globalCelShader ? ShaderInfoForShader(globalCelShader) : NULL);
 
        /* jal : entity based _shadeangle */
        shadeAngle = 0.0f;