From a1f6daea42fca6b37d92ca89ae7a9a18cb77588b Mon Sep 17 00:00:00 2001 From: sajt Date: Thu, 1 Sep 2005 01:59:04 +0000 Subject: [PATCH] No longer gives fail message when skybox loads properly, and no longer gives two fail messages when skybox doesn't load properly git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5676 d7cf8633-e32d-0410-b094-e92efae38249 --- r_sky.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/r_sky.c b/r_sky.c index fa9c0df2..d6bea016 100644 --- 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 -- 2.39.2