From a52fb38c7d578b0353a654b5e0f4bfbd7fd6ce62 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 3 Jun 2015 15:21:24 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4879 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_demo.c | 4 ++++ engine/client/m_mp3.c | 11 +++++++++-- engine/client/skin.c | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index 2b3a57e7b..386f866af 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -82,6 +82,8 @@ void CL_StopPlayback (void) if (cls.timedemo) CL_FinishTimeDemo (); + + TP_ExecTrigger("f_demoend"); } /* @@ -1792,6 +1794,8 @@ void CL_PlayDemo(char *demoname, qboolean usesystempath) { Con_Printf ("ERROR: couldn't open \"%s\".\n", demoname); cls.demonum = -1; // stop demo loop + + TP_ExecTrigger ("f_demoend"); return; } Q_strncpyz (lastdemoname, demoname, sizeof(lastdemoname)); diff --git a/engine/client/m_mp3.c b/engine/client/m_mp3.c index 01fd91b23..51e79b3bd 100644 --- a/engine/client/m_mp3.c +++ b/engine/client/m_mp3.c @@ -2508,12 +2508,12 @@ qboolean captureframeforce; qboolean capturepaused; cvar_t capturerate = CVAR("capturerate", "30"); -#if defined(WINAVI) +#if 0//defined(WINAVI) cvar_t capturedriver = CVARD("capturedriver", "avi", "The driver to use to capture the demo. avformat can be supported via a plugin.\navi: capture directly to avi (capturecodec should be a fourcc value).\nraw: capture to a series of screenshots."); cvar_t capturecodec = CVAR("capturecodec", "divx"); #else cvar_t capturedriver = CVARD("capturedriver", "raw", "The driver to use to capture the demo. avformat can be supported via a plugin.\nraw: capture to a series of screenshots."); -cvar_t capturecodec = CVAR("capturecodec", "tga"); +cvar_t capturecodec = CVARD("capturecodec", "tga", "the compression/encoding codec to use. With raw capturing, this should be one of tga,png,jpg,pcx (ie: screenshot extensions).\nWith (win)avi, this should be a fourcc code like divx or xvid."); #endif cvar_t capturesound = CVAR("capturesound", "1"); cvar_t capturesoundchannels = CVAR("capturesoundchannels", "1"); @@ -2558,6 +2558,7 @@ static void *QDECL capture_raw_begin (char *streamname, int videorate, int width if (*sndchannels < 1) *sndchannels = 1; Q_snprintfz(filename, sizeof(filename), "%s/audio_%ichan_%ikhz_%ib.raw", ctx->videonameprefix, *sndchannels, *sndkhz/1000, *sndbits); + FS_CreatePath(filename, FS_GAMEONLY); ctx->audio = FS_OpenVFS(filename, "wb", FS_GAMEONLY); } if (!ctx->audio) @@ -3184,6 +3185,12 @@ void Media_RecordDemo_f(void) if (Cmd_FromGamecode()) return; + if (!Renderer_Started() && !isDedicated) + { + Cbuf_AddText(va("wait;%s %s\n", Cmd_Argv(0), Cmd_Args()), Cmd_ExecLevel); + return; + } + CL_PlayDemo(Cmd_Argv(1), false); if (Cmd_Argc() > 2) Cmd_ShiftArgs(1, false); diff --git a/engine/client/skin.c b/engine/client/skin.c index d766d87d3..381305646 100644 --- a/engine/client/skin.c +++ b/engine/client/skin.c @@ -428,6 +428,8 @@ qbyte *Skin_Cache8 (qwskin_t *skin) skin->loadstate = SKIN_LOADED; return NULL; //can use the high-res textures instead. } + else + skin->textures.base = r_nulltex; } if (skin->loadstate == SKIN_FAILED)