]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
No longer gives fail message when skybox loads properly, and no longer gives two...
authorsajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Sep 2005 01:59:04 +0000 (01:59 +0000)
committersajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Sep 2005 01:59:04 +0000 (01:59 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5676 d7cf8633-e32d-0410-b094-e92efae38249

r_sky.c

diff --git a/r_sky.c b/r_sky.c
index fa9c0df2e5dcef4de198efb8048cc46522198c2f..d6bea0166b07cb9d80c29b610537e04c040f1253 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -84,7 +84,7 @@ void R_UnloadSkyBox(void)
        }
 }
 
-void R_LoadSkyBox(void)
+int R_LoadSkyBox(void)
 {
        int i, j, success;
        int indices[4] = {0,1,2,3};
@@ -95,7 +95,7 @@ void R_LoadSkyBox(void)
        R_UnloadSkyBox();
 
        if (!skyname[0])
-               return;
+               return true;
 
        for (j=0; j<3; j++)
        {
@@ -126,7 +126,9 @@ void R_LoadSkyBox(void)
        }
 
        if (j == 3)
-               Con_Printf ("Failed to load %s as skybox\n", skyname);
+               return false;
+
+       return true;
 }
 
 int R_SetSkyBox(const char *sky)
@@ -142,11 +144,7 @@ int R_SetSkyBox(const char *sky)
 
        strcpy(skyname, sky);
 
-       R_LoadSkyBox();
-
-       if (!skyname[0])
-               return true;
-       return false;
+       return R_LoadSkyBox();
 }
 
 // LordHavoc: added LoadSky console command