diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-01-19 16:45:38 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-01-19 16:45:38 +0400 |
commit | b109dc1e4cc50befb798e15c40e65933dbaa8310 (patch) | |
tree | 7515e898526abb5990032fe957a18139a1bf942a | |
parent | 05d35f770058dadc174db07717c16779c336560a (diff) |
Cinematic pic belongs to client state.
-rw-r--r-- | src/client/main.c | 4 | ||||
-rw-r--r-- | src/client/screen.c | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/client/main.c b/src/client/main.c index 129ac43..1006cd7 100644 --- a/src/client/main.c +++ b/src/client/main.c @@ -2378,6 +2378,8 @@ void CL_RestartFilesystem(qboolean total) CL_LoadState(LOAD_SOUNDS); CL_RegisterSounds(); CL_LoadState(LOAD_FINISH); + } else if (cls_state == ca_cinematic) { + cl.image_precache[0] = R_RegisterPic2(cl.mapname); } CL_LoadDownloadIgnores(); @@ -2426,6 +2428,8 @@ void CL_RestartRefresh(qboolean total) CL_LoadState(LOAD_MAP); CL_PrepRefresh(); CL_LoadState(LOAD_FINISH); + } else if (cls_state == ca_cinematic) { + cl.image_precache[0] = R_RegisterPic2(cl.mapname); } // switch back to original state diff --git a/src/client/screen.c b/src/client/screen.c index 95e2714..1117e28 100644 --- a/src/client/screen.c +++ b/src/client/screen.c @@ -36,8 +36,6 @@ static struct { int loading_width, loading_height; qboolean draw_loading; - qhandle_t cinematic_pic; - qhandle_t sb_pics[2][STAT_PICS]; qhandle_t inven_pic; qhandle_t field_pic; @@ -1285,10 +1283,6 @@ void SCR_RegisterMedia(void) scr.net_pic = R_RegisterPic("net"); scr.font_pic = R_RegisterFont(scr_font->string); - // reload cinematic picture - if (scr.cinematic_pic) - scr.cinematic_pic = R_RegisterPic2(cl.mapname); - scr_crosshair_changed(scr_crosshair); } @@ -1395,8 +1389,8 @@ void SCR_PlayCinematic(const char *name) return; } - scr.cinematic_pic = R_RegisterPic2(name); - if (!scr.cinematic_pic) { + cl.image_precache[0] = R_RegisterPic2(name); + if (!cl.image_precache[0]) { SCR_FinishCinematic(); return; } @@ -2070,7 +2064,7 @@ static void SCR_DrawActive(void) } if (cls.state == ca_cinematic) { - R_DrawStretchPic(0, 0, r_config.width, r_config.height, scr.cinematic_pic); + R_DrawStretchPic(0, 0, r_config.width, r_config.height, cl.image_precache[0]); return; } |