mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@379 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
42fe36d067
commit
e4afb39e66
3 changed files with 24 additions and 12 deletions
|
@ -1386,7 +1386,7 @@ static int md3draw (md3model *m, spritetype *tspr)
|
|||
|
||||
bglEnable(GL_TEXTURE_2D);
|
||||
|
||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * SHADESCALE)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * shadescale)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
||||
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
||||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||
|
@ -2391,7 +2391,7 @@ if (grhalfxdown10x < 0) { mat[0] = -mat[0]; mat[4] = -mat[4]; mat[8] = -mat[8];
|
|||
|
||||
bglEnable(GL_TEXTURE_2D);
|
||||
|
||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * SHADESCALE)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||
pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max((globalshade * shadescale)+m->shadeoff,0),numpalookups)))/((float)numpalookups);
|
||||
pc[0] *= (float)hictinting[globalpal].r / 255.0;
|
||||
pc[1] *= (float)hictinting[globalpal].g / 255.0;
|
||||
pc[2] *= (float)hictinting[globalpal].b / 255.0;
|
||||
|
|
|
@ -84,6 +84,8 @@ static double dxb1[MAXWALLSB], dxb2[MAXWALLSB];
|
|||
#define FOGSCALE 0.0000640
|
||||
#define PI 3.14159265358979323
|
||||
|
||||
float shadescale = 1.250;
|
||||
|
||||
static double gyxscale, gxyaspect, gviewxrange, ghalfx, grhalfxdown10, grhalfxdown10x, ghoriz;
|
||||
static double gcosang, gsinang, gcosang2, gsinang2;
|
||||
static double gchang, gshang, gctang, gstang, gvisibility;
|
||||
|
@ -133,8 +135,6 @@ long fullbrightloadingpass = 0;
|
|||
long fullbrightdrawingpass = 0;
|
||||
long shadeforfullbrightpass;
|
||||
|
||||
#define SHADESCALE 1.250
|
||||
|
||||
float fogcalc (signed char shade, char vis)
|
||||
{
|
||||
float result;
|
||||
|
@ -1492,7 +1492,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
|||
|
||||
{
|
||||
float pc[4];
|
||||
f = ((float)(numpalookups-min(max(globalshade * SHADESCALE,0),numpalookups)))/((float)numpalookups);
|
||||
f = ((float)(numpalookups-min(max(globalshade * shadescale,0),numpalookups)))/((float)numpalookups);
|
||||
pc[0] = pc[1] = pc[2] = f;
|
||||
switch (method&3)
|
||||
{
|
||||
|
@ -4596,7 +4596,7 @@ void polymost_fillpolygon (long npoints)
|
|||
pth = gltexcache(globalpicnum,globalpal,0);
|
||||
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
||||
|
||||
f = ((float)(numpalookups-min(max(globalshade * SHADESCALE,0),numpalookups)))/((float)numpalookups);
|
||||
f = ((float)(numpalookups-min(max(globalshade * shadescale,0),numpalookups)))/((float)numpalookups);
|
||||
switch ((globalorientation>>7)&3) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
@ -4923,6 +4923,15 @@ static int osdcmd_polymostvars(const osdfuncparm_t *parm)
|
|||
else glnvmultisamplehint = (val != 0);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
else if (!Bstrcasecmp(parm->name, "r_shadescale")) {
|
||||
if (showval) { OSD_Printf("r_shadescale is %d\n", shadescale); }
|
||||
else
|
||||
{
|
||||
float fval = atof(parm->parms[0]);
|
||||
shadescale = fval;
|
||||
}
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
@ -4970,10 +4979,7 @@ void polymost_initosdfuncs(void)
|
|||
OSD_RegisterFunction("glusetexcachecompression","usetexcachecompression: enable/disable compression of files in the OpenGL compressed texture cache",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glmultisample","glmultisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("glnvmultisamplehint","glnvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("r_shadescale","r_shadescale: multiplier for lighting on shade >= 0 surfaces",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("r_sprshadescale","r_sprshadescale: multiplier for sprite lighting",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("r_negshadescale","r_negshadescale: multiplier for lighting on shade < 0 surfaces",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("r_negshadeoffset","r_negshadeoffset: offset for lighting on shade < 0 surfaces",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("r_shadescale","r_shadescale: multiplier for lighting",osdcmd_polymostvars);
|
||||
#endif
|
||||
OSD_RegisterFunction("usemodels","usemodels: enable/disable model rendering in >8-bit mode",osdcmd_polymostvars);
|
||||
OSD_RegisterFunction("usehightile","usehightile: enable/disable hightile texture rendering in >8-bit mode",osdcmd_polymostvars);
|
||||
|
|
|
@ -133,6 +133,12 @@ int osdcmd_map(const osdfuncparm_t *parm)
|
|||
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
strcpy(filename,parm->parms[0]);
|
||||
if (strchr(filename,'.') == 0)
|
||||
strcat(filename,".map");
|
||||
|
@ -411,7 +417,7 @@ int osdcmd_setvar(const osdfuncparm_t *parm)
|
|||
|
||||
if (parm->numparms != 2) return OSDCMD_SHOWHELP;
|
||||
|
||||
if (ud.multimode != 1)
|
||||
if (numplayers > 1)
|
||||
{
|
||||
OSD_Printf("Command not allowed in multiplayer\n");
|
||||
return OSDCMD_OK;
|
||||
|
@ -543,7 +549,7 @@ int osdcmd_cvar_set(const osdfuncparm_t *parm)
|
|||
{
|
||||
if (!Bstrcasecmp(parm->name, cvar[i].name))
|
||||
{
|
||||
if ((cvar[i].type & 0x80) && ud.multimode != 1)
|
||||
if ((cvar[i].type & 0x80) && numplayers > 1)
|
||||
{
|
||||
// sound the alarm
|
||||
OSD_Printf("Cvar \"%s\" locked in multiplayer.\n",cvar[i].name);
|
||||
|
|
Loading…
Reference in a new issue