Add new cvar: r_drawGLQuakeShadow
This commit is contained in:
parent
d84ef55b78
commit
7400694e81
|
@ -39,6 +39,18 @@ seta g_mapCycle "mapcycle.txt" // Map cycle file for multiplayer games.
|
||||||
// input console variables
|
// input console variables
|
||||||
seta in_zoomSensitivity 1.0 // Mouse sensitivity multiplier for when we're using the +zoomin command.
|
seta in_zoomSensitivity 1.0 // Mouse sensitivity multiplier for when we're using the +zoomin command.
|
||||||
|
|
||||||
|
// rendering related cvars
|
||||||
|
seta r_drawGLQuakeShadow 0 // Draws a GLQuake styled shadow under certain entities when enabled.
|
||||||
|
seta r_skipBeams 0 // Skip rendering of beam effects.
|
||||||
|
seta r_skipDiffuse 0 // Skip rendering of diffuse/albedo textures.
|
||||||
|
seta r_skipGlows 0 // Skip rendering of coronas/glow sprite effects.
|
||||||
|
seta r_skipLensFlares 0 // Skip rendering of lens flares.
|
||||||
|
seta r_skipLightmap 0 // Skip rendering of the lightmap in levels.
|
||||||
|
seta r_skipDetail 0 // Skip rendering of detail textures on surfaces.
|
||||||
|
seta r_skipEnvmap 0 // Skip rendering of environment/cube maps on surfaces.
|
||||||
|
seta r_skipFullbright 0 // Skip rendering of fullbright textures on surfaces.
|
||||||
|
seta r_skipNormal 0 // Skip rendering of normal/bump maps on surfaces.
|
||||||
|
|
||||||
// aliases for the older commands (may be removed some day)
|
// aliases for the older commands (may be removed some day)
|
||||||
alias cl_autojump pm_autoJump
|
alias cl_autojump pm_autoJump
|
||||||
alias cl_showfps com_showFPS
|
alias cl_showfps com_showFPS
|
||||||
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Vera Visions LLC.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
NSMoverEntity::NSMoverEntity(void)
|
NSMoverEntity::NSMoverEntity(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -545,6 +545,30 @@ NSRenderableEntity::RenderAxialScale(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NSRenderableEntity::RenderGLQuakeShadow(void)
|
||||||
|
{
|
||||||
|
vector oldOrigin = origin;
|
||||||
|
|
||||||
|
if (autocvar(r_drawGLQuakeShadow, 0) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (effects & EF_NOSHADOW)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_bIsBrush == true)
|
||||||
|
return;
|
||||||
|
|
||||||
|
traceline(origin + [0, 0, 1], origin + [0, 0, -1024], MOVE_NORMAL, this);
|
||||||
|
origin = trace_endpos + [0,0,1];
|
||||||
|
makevectors(angles);
|
||||||
|
v_up *= 0.01;
|
||||||
|
renderflags = RF_USEAXIS;
|
||||||
|
alpha = 0.5f;
|
||||||
|
addentity_lighting(this, [0,0,0], [0, 0, 0], [0,0,0], 0, 0);
|
||||||
|
origin = oldOrigin;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
============
|
============
|
||||||
NSRenderableEntity::predraw
|
NSRenderableEntity::predraw
|
||||||
|
@ -596,6 +620,8 @@ NSRenderableEntity::predraw(void)
|
||||||
}
|
}
|
||||||
oldorigin = origin;
|
oldorigin = origin;
|
||||||
|
|
||||||
|
RenderGLQuakeShadow();
|
||||||
|
|
||||||
return (PREDRAW_NEXT);
|
return (PREDRAW_NEXT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -972,6 +972,7 @@ NSTalkMonster::predraw(void)
|
||||||
|
|
||||||
addentity(this);
|
addentity(this);
|
||||||
_RenderDebugViewCone();
|
_RenderDebugViewCone();
|
||||||
|
RenderGLQuakeShadow();
|
||||||
|
|
||||||
return (PREDRAW_NEXT);
|
return (PREDRAW_NEXT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue