mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 03:51:41 +00:00
view.c: restore WinQuake gun position with a r_viewmodel_quake cvar (default to off).
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1477 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
90e51f683a
commit
285e8d470f
4 changed files with 21 additions and 0 deletions
|
@ -173,6 +173,7 @@ The "game" command doesn't execute quake.rc in the new game directory being swit
|
|||
<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> 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).
|
||||
<item> New "randmap" command for loading a random map.
|
||||
<item> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).
|
||||
|
|
16
Quake/view.c
16
Quake/view.c
|
@ -61,6 +61,8 @@ cvar_t crosshair = {"crosshair", "0", CVAR_ARCHIVE};
|
|||
|
||||
cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", CVAR_NONE};
|
||||
|
||||
cvar_t r_viewmodel_quake = {"r_viewmodel_quake", "0", CVAR_ARCHIVE};
|
||||
|
||||
float v_dmg_time, v_dmg_roll, v_dmg_pitch;
|
||||
|
||||
extern int in_forward, in_forward2, in_back;
|
||||
|
@ -788,6 +790,18 @@ void V_CalcRefdef (void)
|
|||
view->origin[2] += bob;
|
||||
|
||||
//johnfitz -- removed all gun position fudging code (was used to keep gun from getting covered by sbar)
|
||||
//MarkV -- restored this with r_viewmodel_quake cvar
|
||||
if (r_viewmodel_quake.value)
|
||||
{
|
||||
if (scr_viewsize.value == 110)
|
||||
view->origin[2] += 1;
|
||||
else if (scr_viewsize.value == 100)
|
||||
view->origin[2] += 2;
|
||||
else if (scr_viewsize.value == 90)
|
||||
view->origin[2] += 1;
|
||||
else if (scr_viewsize.value == 80)
|
||||
view->origin[2] += 0.5;
|
||||
}
|
||||
|
||||
view->model = cl.model_precache[cl.stats[STAT_WEAPON]];
|
||||
view->frame = cl.stats[STAT_WEAPONFRAME];
|
||||
|
@ -913,5 +927,7 @@ void V_Init (void)
|
|||
Cvar_RegisterVariable (&v_kickroll);
|
||||
Cvar_RegisterVariable (&v_kickpitch);
|
||||
Cvar_RegisterVariable (&v_gunkick); //johnfitz
|
||||
|
||||
Cvar_RegisterVariable (&r_viewmodel_quake); //MarkV
|
||||
}
|
||||
|
||||
|
|
|
@ -265,6 +265,7 @@ these patched libSDL binaries may help.
|
|||
<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> 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>
|
||||
<LI> New "randmap" command for loading a random map.</LI>
|
||||
<LI> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).</LI>
|
||||
|
|
|
@ -329,6 +329,9 @@
|
|||
o New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2,
|
||||
1/3, or 1/4 resolution.
|
||||
|
||||
o New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position
|
||||
(from MarkV).
|
||||
|
||||
o New "find" / "apropos" command, searches for commands/cvar names
|
||||
for the given substring (from Spike).
|
||||
|
||||
|
|
Loading…
Reference in a new issue