mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Add cl_demoreel cvar.
This commit is contained in:
parent
7e8c5ecd29
commit
3dd6a85a9f
5 changed files with 29 additions and 3 deletions
|
@ -56,6 +56,7 @@ cvar_t cl_maxpitch = {"cl_maxpitch", "90", CVAR_ARCHIVE}; //johnfitz -- variable
|
|||
cvar_t cl_minpitch = {"cl_minpitch", "-90", CVAR_ARCHIVE}; //johnfitz -- variable pitch clamping
|
||||
|
||||
cvar_t cl_recordingdemo = {"cl_recordingdemo", "", CVAR_ROM}; //the name of the currently-recording demo.
|
||||
cvar_t cl_demoreel = {"cl_demoreel", "0", CVAR_ARCHIVE};
|
||||
|
||||
client_static_t cls;
|
||||
client_state_t cl;
|
||||
|
@ -1570,6 +1571,7 @@ void CL_Init (void)
|
|||
Cvar_RegisterVariable (&cl_maxpitch); //johnfitz -- variable pitch clamping
|
||||
Cvar_RegisterVariable (&cl_minpitch); //johnfitz -- variable pitch clamping
|
||||
Cvar_RegisterVariable (&cl_recordingdemo); //spike -- for mod hacks. combine with cvar_string or something
|
||||
Cvar_RegisterVariable (&cl_demoreel);
|
||||
|
||||
Cmd_AddCommand ("entities", CL_PrintEntities_f);
|
||||
Cmd_AddCommand ("disconnect", CL_Disconnect_f);
|
||||
|
|
|
@ -339,6 +339,7 @@ extern cvar_t cl_autofire;
|
|||
extern cvar_t cl_recordingdemo;
|
||||
extern cvar_t cl_shownet;
|
||||
extern cvar_t cl_nolerp;
|
||||
extern cvar_t cl_demoreel;
|
||||
|
||||
extern cvar_t cfg_unbindall;
|
||||
|
||||
|
|
|
@ -1845,7 +1845,10 @@ void COM_Init (void)
|
|||
}
|
||||
|
||||
if (COM_CheckParm("-fitz"))
|
||||
{
|
||||
fitzmode = true;
|
||||
cl_demoreel.string = "1"; //shouldn't be registered yet.
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Cmd_AddCommand ("fitztest", FitzTest_f); //johnfitz
|
||||
#endif
|
||||
|
|
|
@ -2484,7 +2484,7 @@ void Host_Startdemos_f (void)
|
|||
if (!sv.active && cls.demonum != -1 && !cls.demoplayback)
|
||||
{
|
||||
cls.demonum = 0;
|
||||
if (!fitzmode)
|
||||
if (!cl_demoreel.value)
|
||||
{ /* QuakeSpasm customization: */
|
||||
/* go straight to menu, no CL_NextDemo */
|
||||
cls.demonum = -1;
|
||||
|
|
24
Quake/menu.c
24
Quake/menu.c
|
@ -251,8 +251,10 @@ void M_Main_Key (int key)
|
|||
m_state = m_none;
|
||||
cls.demonum = m_save_demonum;
|
||||
IN_UpdateGrabs();
|
||||
if (!fitzmode) /* QuakeSpasm customization: */
|
||||
if (!cl_demoreel.value) /* QuakeSpasm customization: */
|
||||
break;
|
||||
if (cl_demoreel.value >= 2 && cls.demonum == -1)
|
||||
cls.demonum = 0;
|
||||
if (cls.demonum != -1 && !cls.demoplayback && cls.state != ca_connected)
|
||||
CL_NextDemo ();
|
||||
break;
|
||||
|
@ -1628,6 +1630,7 @@ static enum extras_e
|
|||
EXTRAS_MODELLERP,
|
||||
EXTRAS_FPSCAP,
|
||||
EXTRAS_YIELD,
|
||||
EXTRAS_DEMOREEL,
|
||||
EXTRAS_RENDERSCALE,
|
||||
EXTRAS_NETEXTENSIONS,
|
||||
EXTRAS_QCEXTENSIONS,
|
||||
|
@ -1713,6 +1716,14 @@ static void M_Extras_AdjustSliders (int dir)
|
|||
case EXTRAS_YIELD:
|
||||
Cvar_SetQuick (&sys_throttle, sys_throttle.value?"0":sys_throttle.default_string);
|
||||
break;
|
||||
case EXTRAS_DEMOREEL:
|
||||
m = cl_demoreel.value+dir;
|
||||
if (m < 0)
|
||||
m = 2;
|
||||
else if (m > 2)
|
||||
m = 0;
|
||||
Cvar_SetValueQuick (&cl_demoreel, m);
|
||||
break;
|
||||
case EXTRAS_RENDERSCALE:
|
||||
m = r_scale.value-dir;
|
||||
m = CLAMP(1, m, 4);
|
||||
|
@ -1790,6 +1801,15 @@ void M_Extras_Draw (void)
|
|||
else
|
||||
M_Print (220, y, "off");
|
||||
break;
|
||||
case EXTRAS_DEMOREEL:
|
||||
M_Print (16, y, " Attract Mode");
|
||||
if (cl_demoreel.value>1)
|
||||
M_Print (220, y, "on");
|
||||
else if (cl_demoreel.value)
|
||||
M_Print (220, y, "startup only");
|
||||
else
|
||||
M_Print (220, y, "off");
|
||||
break;
|
||||
case EXTRAS_RENDERSCALE:
|
||||
M_Print (16, y, " Render Scale");
|
||||
if (r_scale.value==1)
|
||||
|
@ -3237,7 +3257,7 @@ void M_Draw (void)
|
|||
|
||||
case m_extras:
|
||||
M_Extras_Draw ();
|
||||
return;
|
||||
break;
|
||||
|
||||
case m_video:
|
||||
M_Video_Draw ();
|
||||
|
|
Loading…
Reference in a new issue