From 4d6d15f0e9347a264e05653489119d5e271873d8 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 22 May 2008 23:14:23 +0000 Subject: [PATCH] simplified failed cubemap handling git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8310 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 6 ++---- todo | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index 27b1ffb5..576e4b0e 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -3417,14 +3417,12 @@ rtexture_t *R_Shadow_Cubemap(const char *basename) int i; for (i = 0;i < numcubemaps;i++) if (!strcasecmp(cubemaps[i].basename, basename)) - return cubemaps[i].texture; + return cubemaps[i].texture ? cubemaps[i].texture : r_texture_whitecube; if (i >= MAX_CUBEMAPS) return r_texture_whitecube; numcubemaps++; strlcpy(cubemaps[i].basename, basename, sizeof(cubemaps[i].basename)); cubemaps[i].texture = R_Shadow_LoadCubemap(cubemaps[i].basename); - if (!cubemaps[i].texture) - cubemaps[i].texture = r_texture_whitecube; return cubemaps[i].texture; } @@ -3435,7 +3433,7 @@ void R_Shadow_FreeCubemaps(void) { if (developer_loading.integer) Con_Printf("unloading cubemap \"%s\"\n", cubemaps[i].basename); - if (cubemaps[i].texture != r_texture_whitecube) + if (cubemaps[i].texture) R_FreeTexture(cubemaps[i].texture); } diff --git a/todo b/todo index 81616126..e089a881 100644 --- a/todo +++ b/todo @@ -14,6 +14,7 @@ 0 bug darkplaces client qw: qw skins should only be active on progs/player.mdl (Plague Monkey Rat) 0 bug darkplaces client qw: qw/skins/*.pcx need to be cropped to 296x194 and loaded as internal textures so they are split into multiple layers (Plague Monkey Rat) 0 bug darkplaces client qw: restrict wateralpha and such cvars according to what is permitted in qw serverinfo? +0 bug darkplaces client sbar: when playing demos recorded from singleplayer, the deathmatch hud seems to be used, perhaps we have to force it off for maxplayers 1? (Spirit) 0 bug darkplaces client timedemo: investigate bogus results of one-second min/avg/max, clearly not working properly (Willis) 0 bug darkplaces client win64: crash in R_DrawRTLight due to stack overflow, change the pointer arrays to indexes into r_refdef.scene.entities, or increase projects to build with 4MB stack instead of 2MB - also clean up these warnings: http://dp.deathmask.net/log/dp_x64_buildlog_r8078.txt (Willis) 0 bug darkplaces client: can't move mouse around in nexuiz menu if vid_mouse is 0 @@ -34,6 +35,7 @@ 0 bug darkplaces renderer: coronas are not affected by fog (div0) 0 bug darkplaces renderer: if an animated model has transparent surfaces, each one calls RSurf_ActiveModelEntity, recomputing all vertices 0 bug darkplaces renderer: if an animated model is entirely transparent, the RSurf_ActiveModelEntity call updating vertices is completely wasted +0 bug darkplaces renderer: r_speeds sometimes counts entities twice, the whole counting code needs auditing (Morphed, and jim on inside3d) 0 bug darkplaces server csqc networking: csqc entity sending code does not currently detect packet loss and repeat lost entities (FrikaC, Chris Page, div0) 0 bug darkplaces server: SV_PushMove is ignoring model type in its angles_x handling, where as the renderer checks only model type to determine angles_x handling (Urre) 0 bug darkplaces server: SV_PushMove's call to SV_ClipMoveToEntity should do a trace, not just a point test, to support hollow pusher models (Urre) -- 2.39.2