]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix 9924 REALLY, this time transforming dp_ into dp in ALL shader parsing instances
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 5 Feb 2010 12:15:31 +0000 (12:15 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 5 Feb 2010 12:15:31 +0000 (12:15 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9940 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index f56515d910dab9550d52b80d6359270aead56115..03f0604664fa4878bf5573c5a0da23274c6b3ad2 100644 (file)
@@ -1845,7 +1845,11 @@ void Mod_LoadQ3Shaders(void)
                                {
                                        if (j < TEXTURE_MAXFRAMES + 4)
                                        {
-                                               strlcpy(parameter[j], com_token, sizeof(parameter[j]));
+                                               // remap dp_water to dpwater, dp_reflect to dpreflect, etc.
+                                               if(j == 0 && !strncasecmp(com_token, "dp_", 3))
+                                                       dpsnprintf(parameter[j], sizeof(parameter[j]), "dp%s", &com_token[3]);
+                                               else
+                                                       strlcpy(parameter[j], com_token, sizeof(parameter[j]));
                                                numparameters = j + 1;
                                        }
                                        if (!COM_ParseToken_QuakeC(&text, true))