]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
fixed bug with effectinfo.txt loading so that it now loads the proper
[xonotic/darkplaces.git] / cl_particles.c
index a5b987eaae564254e5ec8d642421060754639be6..c33df7baf8b58af134f3d605ec37307e220184b7 100644 (file)
@@ -480,7 +480,11 @@ void CL_Particles_LoadEffectInfo(void)
                if (filepass == 0)
                        dpsnprintf(filename, sizeof(filename), "effectinfo.txt");
                else if (filepass == 1)
-                       dpsnprintf(filename, sizeof(filename), "maps/%s_effectinfo.txt", cl.levelname);
+               {
+                       if (!cl.worldbasename[0])
+                               continue;
+                       dpsnprintf(filename, sizeof(filename), "%s_effectinfo.txt", cl.worldnamenoextension);
+               }
                else
                        break;
                filedata = FS_LoadFile(filename, tempmempool, true, &filesize);
@@ -1520,13 +1524,12 @@ void CL_ReadPointFile_f (void)
        vec3_t org, leakorg;
        int r, c, s;
        char *pointfile = NULL, *pointfilepos, *t, tchar;
-       char name[MAX_OSPATH];
+       char name[MAX_QPATH];
 
        if (!cl.worldmodel)
                return;
 
-       FS_StripExtension (cl.worldmodel->name, name, sizeof (name));
-       strlcat (name, ".pts", sizeof (name));
+       dpsnprintf(name, sizeof(name), "%s.pts", cl.worldnamenoextension);
        pointfile = (char *)FS_LoadFile(name, tempmempool, true, NULL);
        if (!pointfile)
        {