mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-31 04:30:38 +00:00
attempted fix for linux, added stupid hack for gl_fb_models 1;r_fullbrightskins 1, changed allow fbskins logic, r_fullbrightskins defaults to 0
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2273 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5c7cae1ffe
commit
181592a0e3
5 changed files with 60 additions and 35 deletions
|
@ -1320,6 +1320,7 @@ void CL_CheckServerInfo(void)
|
|||
#ifdef FISH
|
||||
cls.allow_fish=false;
|
||||
#endif
|
||||
cls.allow_fbskins = 1;
|
||||
// cls.allow_fbskins = 0;
|
||||
// cls.allow_overbrightlight;
|
||||
if (cls.demoplayback || atoi(Info_ValueForKey(cl.serverinfo, "rearview")))
|
||||
|
@ -1352,10 +1353,10 @@ void CL_CheckServerInfo(void)
|
|||
#endif
|
||||
|
||||
s = Info_ValueForKey(cl.serverinfo, "fbskins");
|
||||
if (cls.demoplayback || *s)
|
||||
if (*s)
|
||||
cls.allow_fbskins = atof(s);
|
||||
else
|
||||
cls.allow_fbskins = 1;
|
||||
else if (cl.teamfortress)
|
||||
cls.allow_fbskins = 0;
|
||||
|
||||
s = Info_ValueForKey(cl.serverinfo, "*cheats");
|
||||
if (cls.demoplayback || !stricmp(s, "on"))
|
||||
|
|
|
@ -118,9 +118,9 @@ cvar_t r_part_rain = SCVARF("r_part_rain", "0", CVAR_ARCHIVE);
|
|||
|
||||
cvar_t r_bouncysparks = SCVARF("r_bouncysparks", "0", CVAR_ARCHIVE);
|
||||
|
||||
cvar_t r_fullbrightSkins = SCVARF("r_fullbrightSkins", "1", CVAR_SEMICHEAT);
|
||||
cvar_t r_fb_models = SCVARF("gl_fb_models", "1", CVAR_SEMICHEAT|CVAR_RENDERERLATCH); //as it can highlight the gun a little... ooo nooo....
|
||||
cvar_t r_fb_bmodels = SCVARF("gl_fb_bmodels", "1", CVAR_SEMICHEAT|CVAR_RENDERERLATCH); //as it can highlight the gun a little... ooo nooo....
|
||||
cvar_t r_fullbrightSkins = SCVARF("r_fullbrightSkins", "0", CVAR_SEMICHEAT);
|
||||
cvar_t r_fb_models = FCVAR("r_fb_models", "gl_fb_models", "1", CVAR_SEMICHEAT|CVAR_RENDERERLATCH);
|
||||
cvar_t r_fb_bmodels = SCVARF("gl_fb_bmodels", "1", CVAR_SEMICHEAT|CVAR_RENDERERLATCH);
|
||||
|
||||
cvar_t r_shadow_bumpscale_basetexture = SCVAR("r_shadow_bumpscale_basetexture", "4");
|
||||
cvar_t r_shadow_bumpscale_bumpmap = SCVAR("r_shadow_bumpscale_bumpmap", "10");
|
||||
|
@ -355,7 +355,6 @@ void GLRenderer_Init(void)
|
|||
Cvar_Register (&gl_overbright, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_overbright_all, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_dither, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_fb_models, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_fb_bmodels, GRAPHICALNICETIES);
|
||||
|
||||
Cvar_Register (&gl_ati_truform, GRAPHICALNICETIES);
|
||||
|
@ -569,6 +568,8 @@ void Renderer_Init(void)
|
|||
Cvar_Register (&r_drawflat, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_menutint, GRAPHICALNICETIES);
|
||||
|
||||
Cvar_Register (&r_fb_models, GRAPHICALNICETIES);
|
||||
|
||||
//bulletens
|
||||
Cvar_Register(&bul_nowater, BULLETENVARS);
|
||||
Cvar_Register(&bul_rippleamount, BULLETENVARS);
|
||||
|
|
|
@ -1723,10 +1723,23 @@ void R_DrawGAliasModel (entity_t *e)
|
|||
fb = 0;
|
||||
if (fb)
|
||||
{
|
||||
for (i = 0; i < 3; i++)
|
||||
extern cvar_t r_fb_models;
|
||||
|
||||
if (fb >= 1 && r_fb_models.value)
|
||||
{
|
||||
ambientlight[i] = max(ambientlight[i], 8 + fb * 120);
|
||||
shadelight[i] = max(shadelight[i], 8 + fb * 120);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
ambientlight[i] = 4096;
|
||||
shadelight[i] = 4096;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
ambientlight[i] = max(ambientlight[i], 8 + fb * 120);
|
||||
shadelight[i] = max(shadelight[i], 8 + fb * 120);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 3; i++)
|
||||
|
|
|
@ -950,11 +950,11 @@ void Force_CenterView_f (void)
|
|||
cl.viewangles[0][PITCH] = 0;
|
||||
}
|
||||
|
||||
#ifndef SWQUAKE
|
||||
void IN_ReInit(void)
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef SWQUAKE
|
||||
void IN_Init(void)
|
||||
{
|
||||
#ifdef IN_XFLIP
|
||||
|
|
|
@ -750,6 +750,7 @@ void SWR_DrawEntitiesOnList (void)
|
|||
{
|
||||
float *org;
|
||||
extern cvar_t r_fullbrightSkins;
|
||||
extern cvar_t r_fb_models;
|
||||
float fb = r_fullbrightSkins.value;
|
||||
if (fb > cls.allow_fbskins)
|
||||
fb = cls.allow_fbskins;
|
||||
|
@ -761,32 +762,41 @@ void SWR_DrawEntitiesOnList (void)
|
|||
else
|
||||
org = currententity->origin;
|
||||
|
||||
j = SWR_LightPoint (org);
|
||||
|
||||
lighting.ambientlight = j+fb * 120;
|
||||
lighting.shadelight = j+fb * 120;
|
||||
|
||||
lighting.plightvec = lightvec;
|
||||
|
||||
for (lnum=0 ; lnum<MAX_DLIGHTS ; lnum++)
|
||||
if (fb >= 1 && r_fb_models.value)
|
||||
{
|
||||
if (cl_dlights[lnum].radius)
|
||||
{
|
||||
VectorSubtract (org,
|
||||
cl_dlights[lnum].origin,
|
||||
dist);
|
||||
add = cl_dlights[lnum].radius - Length(dist);
|
||||
|
||||
if (add > 0)
|
||||
lighting.ambientlight += add;
|
||||
}
|
||||
lighting.ambientlight = 4096;
|
||||
lighting.shadelight = 4096;
|
||||
lighting.plightvec = lightvec;
|
||||
}
|
||||
else
|
||||
{
|
||||
j = SWR_LightPoint (org);
|
||||
|
||||
lighting.ambientlight = j+fb * 120;
|
||||
lighting.shadelight = j+fb * 120;
|
||||
|
||||
lighting.plightvec = lightvec;
|
||||
|
||||
for (lnum=0 ; lnum<MAX_DLIGHTS ; lnum++)
|
||||
{
|
||||
if (cl_dlights[lnum].radius)
|
||||
{
|
||||
VectorSubtract (org,
|
||||
cl_dlights[lnum].origin,
|
||||
dist);
|
||||
add = cl_dlights[lnum].radius - Length(dist);
|
||||
|
||||
if (add > 0)
|
||||
lighting.ambientlight += add;
|
||||
}
|
||||
}
|
||||
|
||||
// clamp lighting so it doesn't overbright as much
|
||||
if (lighting.ambientlight > 128)
|
||||
lighting.ambientlight = 128;
|
||||
if (lighting.ambientlight + lighting.shadelight > 192)
|
||||
lighting.shadelight = 192 - lighting.ambientlight;
|
||||
}
|
||||
|
||||
// clamp lighting so it doesn't overbright as much
|
||||
if (lighting.ambientlight > 128)
|
||||
lighting.ambientlight = 128;
|
||||
if (lighting.ambientlight + lighting.shadelight > 192)
|
||||
lighting.shadelight = 192 - lighting.ambientlight;
|
||||
|
||||
R_AliasDrawModel (&lighting);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue