mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
Revert "always run" changes from r797; move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar.
Set to 1 to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and make "speedkey" act as "slowkey". Change "always run" menu option to offer "off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200), "vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and "quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200). git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1480 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
9c26054be9
commit
79aac789be
8 changed files with 61 additions and 15 deletions
|
@ -169,6 +169,8 @@ these patched libSDL binaries may help.
|
|||
<item> Restore vid_refreshrate from fitzquake-0.85 for SDL2 builds.
|
||||
<item> Alpha-masked model support. (MF_HOLEY: 0x4000).
|
||||
<item> Change default screenshot format to png. The 'screenshot' command now supports optional format (tga, png or jpg) and quality (1-100) arguments.
|
||||
<item> Revert "always run" changes from 0.85.9; move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar. Set to 1 to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and make "speedkey" act as "slowkey".
|
||||
<item> Change "always run" menu option to offer "off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200), "vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and "quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200).
|
||||
<item> New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2, 1/3, or 1/4 resolution.
|
||||
<item> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).
|
||||
<item> New "find" / "apropos" command, searches for commands/cvar names for the given substring (from Spike).
|
||||
|
|
|
@ -232,6 +232,7 @@ cvar_t cl_pitchspeed = {"cl_pitchspeed","150",CVAR_NONE};
|
|||
|
||||
cvar_t cl_anglespeedkey = {"cl_anglespeedkey","1.5",CVAR_NONE};
|
||||
|
||||
cvar_t cl_alwaysrun = {"cl_alwaysrun","0",CVAR_ARCHIVE}; // QuakeSpasm -- new always run
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -245,7 +246,7 @@ void CL_AdjustAngles (void)
|
|||
float speed;
|
||||
float up, down;
|
||||
|
||||
if ((cl_forwardspeed.value > 200) ^ (in_speed.state & 1))
|
||||
if ((in_speed.state & 1) ^ (cl_alwaysrun.value != 0.0))
|
||||
speed = host_frametime * cl_anglespeedkey.value;
|
||||
else
|
||||
speed = host_frametime;
|
||||
|
@ -322,9 +323,7 @@ void CL_BaseMove (usercmd_t *cmd)
|
|||
//
|
||||
// adjust for speed key
|
||||
//
|
||||
if (cl_forwardspeed.value > 200 && cl_movespeedkey.value)
|
||||
cmd->forwardmove /= cl_movespeedkey.value;
|
||||
if ((cl_forwardspeed.value > 200) ^ (in_speed.state & 1))
|
||||
if ((in_speed.state & 1) ^ (cl_alwaysrun.value != 0.0))
|
||||
{
|
||||
cmd->forwardmove *= cl_movespeedkey.value;
|
||||
cmd->sidemove *= cl_movespeedkey.value;
|
||||
|
|
|
@ -791,6 +791,8 @@ void CL_Init (void)
|
|||
Cvar_RegisterVariable (&lookspring);
|
||||
Cvar_RegisterVariable (&lookstrafe);
|
||||
Cvar_RegisterVariable (&sensitivity);
|
||||
|
||||
Cvar_RegisterVariable (&cl_alwaysrun);
|
||||
|
||||
Cvar_RegisterVariable (&m_pitch);
|
||||
Cvar_RegisterVariable (&m_yaw);
|
||||
|
|
|
@ -245,6 +245,8 @@ extern cvar_t cl_pitchspeed;
|
|||
|
||||
extern cvar_t cl_anglespeedkey;
|
||||
|
||||
extern cvar_t cl_alwaysrun; // QuakeSpasm
|
||||
|
||||
extern cvar_t cl_autofire;
|
||||
|
||||
extern cvar_t cl_shownet;
|
||||
|
|
|
@ -674,7 +674,7 @@ void IN_JoyMove (usercmd_t *cmd)
|
|||
moveEased = IN_ApplyMoveEasing(moveDeadzone);
|
||||
lookEased = IN_ApplyLookEasing(lookDeadzone, joy_exponent.value);
|
||||
|
||||
if (in_speed.state & 1)
|
||||
if ((in_speed.state & 1) ^ (cl_alwaysrun.value != 0.0))
|
||||
speed = cl_movespeedkey.value;
|
||||
else
|
||||
speed = 1;
|
||||
|
|
49
Quake/menu.c
49
Quake/menu.c
|
@ -997,6 +997,14 @@ enum
|
|||
OPTIONS_ITEMS
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
ALWAYSRUN_OFF = 0,
|
||||
ALWAYSRUN_VANILLA,
|
||||
ALWAYSRUN_QUAKESPASM,
|
||||
ALWAYSRUN_ITEMS
|
||||
};
|
||||
|
||||
#define SLIDER_RANGE 10
|
||||
|
||||
int options_cursor;
|
||||
|
@ -1012,6 +1020,7 @@ void M_Menu_Options_f (void)
|
|||
|
||||
void M_AdjustSliders (int dir)
|
||||
{
|
||||
int curr_alwaysrun, target_alwaysrun;
|
||||
float f, l;
|
||||
|
||||
S_LocalSound ("misc/menu3.wav");
|
||||
|
@ -1074,17 +1083,32 @@ void M_AdjustSliders (int dir)
|
|||
break;
|
||||
|
||||
case OPT_ALWAYRUN: // always run
|
||||
if (cl_movespeedkey.value <= 1)
|
||||
Cvar_Set ("cl_movespeedkey", "2.0");
|
||||
if (cl_forwardspeed.value > 200)
|
||||
{
|
||||
Cvar_Set ("cl_forwardspeed", "200");
|
||||
Cvar_Set ("cl_backspeed", "200");
|
||||
}
|
||||
if (cl_alwaysrun.value)
|
||||
curr_alwaysrun = ALWAYSRUN_QUAKESPASM;
|
||||
else if (cl_forwardspeed.value > 200)
|
||||
curr_alwaysrun = ALWAYSRUN_VANILLA;
|
||||
else
|
||||
curr_alwaysrun = ALWAYSRUN_OFF;
|
||||
|
||||
target_alwaysrun = (ALWAYSRUN_ITEMS + curr_alwaysrun + dir) % ALWAYSRUN_ITEMS;
|
||||
|
||||
if (target_alwaysrun == ALWAYSRUN_VANILLA)
|
||||
{
|
||||
Cvar_SetValue ("cl_forwardspeed", 200 * cl_movespeedkey.value);
|
||||
Cvar_SetValue ("cl_backspeed", 200 * cl_movespeedkey.value);
|
||||
Cvar_SetValue ("cl_alwaysrun", 0);
|
||||
Cvar_SetValue ("cl_forwardspeed", 400);
|
||||
Cvar_SetValue ("cl_backspeed", 400);
|
||||
}
|
||||
else if (target_alwaysrun == ALWAYSRUN_QUAKESPASM)
|
||||
{
|
||||
Cvar_SetValue ("cl_alwaysrun", 1);
|
||||
Cvar_SetValue ("cl_forwardspeed", 200);
|
||||
Cvar_SetValue ("cl_backspeed", 200);
|
||||
}
|
||||
else // ALWAYSRUN_OFF
|
||||
{
|
||||
Cvar_SetValue ("cl_alwaysrun", 0);
|
||||
Cvar_SetValue ("cl_forwardspeed", 200);
|
||||
Cvar_SetValue ("cl_backspeed", 200);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1203,7 +1227,12 @@ void M_Options_Draw (void)
|
|||
|
||||
// OPT_ALWAYRUN:
|
||||
M_Print (16, 32 + 8*OPT_ALWAYRUN, " Always Run");
|
||||
M_DrawCheckbox (220, 32 + 8*OPT_ALWAYRUN, cl_forwardspeed.value > 200);
|
||||
if (cl_alwaysrun.value)
|
||||
M_Print (220, 32 + 8*OPT_ALWAYRUN, "quakespasm");
|
||||
else if (cl_forwardspeed.value > 200.0)
|
||||
M_Print (220, 32 + 8*OPT_ALWAYRUN, "vanilla");
|
||||
else
|
||||
M_Print (220, 32 + 8*OPT_ALWAYRUN, "off");
|
||||
|
||||
// OPT_INVMOUSE:
|
||||
M_Print (16, 32 + 8*OPT_INVMOUSE, " Invert Mouse");
|
||||
|
|
|
@ -263,6 +263,8 @@ these patched libSDL binaries may help.
|
|||
<LI> Restore vid_refreshrate from fitzquake-0.85 for SDL2 builds.</LI>
|
||||
<LI> Alpha-masked model support. (MF_HOLEY: 0x4000).</LI>
|
||||
<LI> Change default screenshot format to png. The 'screenshot' command now supports optional format (tga, png or jpg) and quality (1-100) arguments.</LI>
|
||||
<LI> Revert "always run" changes from 0.85.9; move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar. Set to 1 to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and make "speedkey" act as "slowkey".</LI>
|
||||
<LI> Change "always run" menu option to offer "off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200), "vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and "quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200).</LI>
|
||||
<LI> New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2, 1/3, or 1/4 resolution.</LI>
|
||||
<LI> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).</LI>
|
||||
<LI> New "find" / "apropos" command, searches for commands/cvar names for the given substring (from Spike).</LI>
|
||||
|
|
|
@ -319,6 +319,16 @@
|
|||
now supports optional format (tga, png or jpg) and quality (1-100)
|
||||
arguments.
|
||||
|
||||
o Revert "always run" changes from 0.85.9; move the QuakeSpasm
|
||||
customizations to a new "cl_alwaysrun" cvar. Set to 1 to scale
|
||||
forward/side/up speed by "cl_movespeedkey" (usually 2),
|
||||
and make "speedkey" act as "slowkey".
|
||||
|
||||
o Change "always run" menu option to offer
|
||||
"off" (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200),
|
||||
"vanilla" (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400) and
|
||||
"quakespasm" (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200).
|
||||
|
||||
o New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2,
|
||||
1/3, or 1/4 resolution.
|
||||
|
||||
|
|
Loading…
Reference in a new issue