mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-24 13:01:46 +00:00
view.c: New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1515 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
638d4e097b
commit
bc00400aef
4 changed files with 23 additions and 0 deletions
|
@ -175,6 +175,7 @@ these patched libSDL binaries may help.
|
||||||
<item> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).
|
<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 "find" / "apropos" command, searches for commands/cvar names for the given substring (from Spike).
|
||||||
<item> New "randmap" command for loading a random map.
|
<item> New "randmap" command for loading a random map.
|
||||||
|
<item> New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.
|
||||||
<item> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).
|
<item> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).
|
||||||
<item> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.
|
<item> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.
|
||||||
<item> Fix crash in BoundPoly with polygons extending beyond +/-9999.
|
<item> Fix crash in BoundPoly with polygons extending beyond +/-9999.
|
||||||
|
|
|
@ -60,6 +60,10 @@ cvar_t v_idlescale = {"v_idlescale", "0", CVAR_NONE};
|
||||||
cvar_t crosshair = {"crosshair", "0", CVAR_ARCHIVE};
|
cvar_t crosshair = {"crosshair", "0", CVAR_ARCHIVE};
|
||||||
|
|
||||||
cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", CVAR_NONE};
|
cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", CVAR_NONE};
|
||||||
|
cvar_t gl_cshiftpercent_contents = {"gl_cshiftpercent_contents", "100", CVAR_NONE}; // QuakeSpasm
|
||||||
|
cvar_t gl_cshiftpercent_damage = {"gl_cshiftpercent_damage", "100", CVAR_NONE}; // QuakeSpasm
|
||||||
|
cvar_t gl_cshiftpercent_bonus = {"gl_cshiftpercent_bonus", "100", CVAR_NONE}; // QuakeSpasm
|
||||||
|
cvar_t gl_cshiftpercent_powerup = {"gl_cshiftpercent_powerup", "100", CVAR_NONE}; // QuakeSpasm
|
||||||
|
|
||||||
cvar_t r_viewmodel_quake = {"r_viewmodel_quake", "0", CVAR_ARCHIVE};
|
cvar_t r_viewmodel_quake = {"r_viewmodel_quake", "0", CVAR_ARCHIVE};
|
||||||
|
|
||||||
|
@ -429,6 +433,12 @@ void V_CalcBlend (void)
|
||||||
{
|
{
|
||||||
float r, g, b, a, a2;
|
float r, g, b, a, a2;
|
||||||
int j;
|
int j;
|
||||||
|
cvar_t *cshiftpercent_cvars[NUM_CSHIFTS] = {
|
||||||
|
&gl_cshiftpercent_contents,
|
||||||
|
&gl_cshiftpercent_damage,
|
||||||
|
&gl_cshiftpercent_bonus,
|
||||||
|
&gl_cshiftpercent_powerup
|
||||||
|
};
|
||||||
|
|
||||||
r = 0;
|
r = 0;
|
||||||
g = 0;
|
g = 0;
|
||||||
|
@ -446,6 +456,9 @@ void V_CalcBlend (void)
|
||||||
//johnfitz
|
//johnfitz
|
||||||
|
|
||||||
a2 = ((cl.cshifts[j].percent * gl_cshiftpercent.value) / 100.0) / 255.0;
|
a2 = ((cl.cshifts[j].percent * gl_cshiftpercent.value) / 100.0) / 255.0;
|
||||||
|
// QuakeSpasm -- also scale by the specific gl_cshiftpercent_* cvar
|
||||||
|
a2 *= (cshiftpercent_cvars[j]->value / 100.0);
|
||||||
|
// QuakeSpasm
|
||||||
if (!a2)
|
if (!a2)
|
||||||
continue;
|
continue;
|
||||||
a = a + a2*(1-a);
|
a = a + a2*(1-a);
|
||||||
|
@ -913,6 +926,10 @@ void V_Init (void)
|
||||||
Cvar_RegisterVariable (&v_idlescale);
|
Cvar_RegisterVariable (&v_idlescale);
|
||||||
Cvar_RegisterVariable (&crosshair);
|
Cvar_RegisterVariable (&crosshair);
|
||||||
Cvar_RegisterVariable (&gl_cshiftpercent);
|
Cvar_RegisterVariable (&gl_cshiftpercent);
|
||||||
|
Cvar_RegisterVariable (&gl_cshiftpercent_contents); // QuakeSpasm
|
||||||
|
Cvar_RegisterVariable (&gl_cshiftpercent_damage); // QuakeSpasm
|
||||||
|
Cvar_RegisterVariable (&gl_cshiftpercent_bonus); // QuakeSpasm
|
||||||
|
Cvar_RegisterVariable (&gl_cshiftpercent_powerup); // QuakeSpasm
|
||||||
|
|
||||||
Cvar_RegisterVariable (&scr_ofsx);
|
Cvar_RegisterVariable (&scr_ofsx);
|
||||||
Cvar_RegisterVariable (&scr_ofsy);
|
Cvar_RegisterVariable (&scr_ofsy);
|
||||||
|
|
|
@ -269,6 +269,7 @@ these patched libSDL binaries may help.
|
||||||
<LI> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).</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 "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> New "randmap" command for loading a random map.</LI>
|
||||||
|
<LI> New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.</LI>
|
||||||
<LI> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).</LI>
|
<LI> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).</LI>
|
||||||
<LI> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.</LI>
|
<LI> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.</LI>
|
||||||
<LI> Fix crash in BoundPoly with polygons extending beyond +/-9999.</LI>
|
<LI> Fix crash in BoundPoly with polygons extending beyond +/-9999.</LI>
|
||||||
|
|
|
@ -340,6 +340,10 @@
|
||||||
|
|
||||||
o New "randmap" command for loading a random map.
|
o New "randmap" command for loading a random map.
|
||||||
|
|
||||||
|
o New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage",
|
||||||
|
"gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for
|
||||||
|
tuning the strength of specic view blends.
|
||||||
|
|
||||||
o Fix macOS startup delay (avoid calling gethostbyname() for ".local"
|
o Fix macOS startup delay (avoid calling gethostbyname() for ".local"
|
||||||
hostnames).
|
hostnames).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue