]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
allow loading non-bsp files as world models (no longer always appends
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 14 Jul 2010 10:13:50 +0000 (10:13 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 14 Jul 2010 10:13:50 +0000 (10:13 +0000)
.bsp suffix)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10323 d7cf8633-e32d-0410-b094-e92efae38249

sv_main.c

index 119fc9edc5c1e211e77c1f124a03c8e3d7ca73ae..5a82ab16bf8e4d21ad62ad70dd3e1d3044036854 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -3075,12 +3075,16 @@ void SV_SpawnServer (const char *server)
 
        Con_DPrintf("SpawnServer: %s\n", server);
 
-       dpsnprintf (modelname, sizeof(modelname), "maps/%s.bsp", server);
+       dpsnprintf (modelname, sizeof(modelname), "maps/%s", server);
 
        if (!FS_FileExists(modelname))
        {
-               Con_Printf("SpawnServer: no map file named %s\n", modelname);
-               return;
+               dpsnprintf (modelname, sizeof(modelname), "maps/%s.bsp", server);
+               if (!FS_FileExists(modelname))
+               {
+                       Con_Printf("SpawnServer: no map file named %s\n", modelname);
+                       return;
+               }
        }
 
        if (cls.state != ca_dedicated)