changed ase texture parsing to match DoomEdit
[xonotic/netradiant.git] / libs / picomodel / pm_ase.c
index 2450075875a78f419fc0098fbd9ce92bf85b1357..264bd2b90c7fe88e5cacb7980bcfe892fde7f0d5 100644 (file)
@@ -1130,24 +1130,28 @@ static picoModel_t *_ase_load( PM_PARAMS_LOAD )
           {
             if(_pico_strnicmp(p, "quake", 5) == 0 || _pico_strnicmp(p, "doom", 4) == 0)
             {
-              break;
-            }
-          }
-          /* root-relative */
-          for(; *p != '\0'; ++p)
-          {
-            if(*p == '/')
-            {
-              ++p;
-              break;
+              /* root-relative */
+              for(; *p != '\0'; ++p)
+              {
+                if(*p == '/')
+                {
+                  ++p;
+                  /* game-relative */
+                  for(; *p != '\0'; ++p)
+                  {
+                    if(*p == '/')
+                    {
+                      ++p;
+                      break;
+                    }
+                  }
+                }
+              }
             }
-          }
-          /* game-relative */
-          for(; *p != '\0'; ++p)
-          {
-            if(*p == '/')
+            /* DoomEdit's ASE loader searches for /base/ */
+            else if(_pico_strnicmp(p, "/base/", 6) == 0)
             {
-              ++p;
+              p += 6;
               break;
             }
           }