mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 09:31:11 +00:00
new wallhack thing
This commit is contained in:
parent
31b92580a5
commit
e0a12a9d4f
3 changed files with 58 additions and 0 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.65 2002/08/29 14:24:26 niceass
|
||||||
|
// new wallhack thing
|
||||||
|
//
|
||||||
// Revision 1.64 2002/08/29 04:45:25 niceass
|
// Revision 1.64 2002/08/29 04:45:25 niceass
|
||||||
// color changes for new outlined font
|
// color changes for new outlined font
|
||||||
//
|
//
|
||||||
|
@ -2488,6 +2491,47 @@ static void CG_DrawIRBlend()
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// If zbuffer is disabled, this should make it impossible to see?
|
||||||
|
// By NiceAss (which means it probably doesn't work)
|
||||||
|
void CG_DrawBigPolygon(void) {
|
||||||
|
vec3_t end, forward, right, up;
|
||||||
|
polyVert_t Corners[4];
|
||||||
|
float Dist = 12288;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
AngleVectors(cg.refdefViewAngles, forward, right, up);
|
||||||
|
VectorMA(cg.refdef.vieworg, Dist, forward, end);
|
||||||
|
|
||||||
|
VectorMA(end, -Dist, right, Corners[0].xyz);
|
||||||
|
VectorMA(Corners[0].xyz, -Dist, up, Corners[0].xyz);
|
||||||
|
Corners[0].st[0] = 0;
|
||||||
|
Corners[0].st[1] = 0;
|
||||||
|
|
||||||
|
VectorMA(end, Dist, right, Corners[1].xyz);
|
||||||
|
VectorMA(Corners[1].xyz, -Dist, up, Corners[1].xyz);
|
||||||
|
Corners[1].st[0] = 0;
|
||||||
|
Corners[1].st[1] = 1;
|
||||||
|
|
||||||
|
VectorMA(end, Dist, right, Corners[2].xyz);
|
||||||
|
VectorMA(Corners[2].xyz, Dist, up, Corners[2].xyz);
|
||||||
|
Corners[2].st[0] = 1;
|
||||||
|
Corners[2].st[1] = 1;
|
||||||
|
|
||||||
|
VectorMA(end, -Dist, right, Corners[3].xyz);
|
||||||
|
VectorMA(Corners[3].xyz, Dist, up, Corners[3].xyz);
|
||||||
|
Corners[3].st[0] = 1;
|
||||||
|
Corners[3].st[1] = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < 4; i++) {
|
||||||
|
Corners[i].modulate[0] = 255;
|
||||||
|
Corners[i].modulate[1] = 255;
|
||||||
|
Corners[i].modulate[2] = 255;
|
||||||
|
Corners[i].modulate[3] = 255;
|
||||||
|
}
|
||||||
|
|
||||||
|
trap_R_AddPolyToScene(cgs.media.blackHackShader, 4, Corners);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=====================
|
=====================
|
||||||
CG_DrawActive
|
CG_DrawActive
|
||||||
|
@ -2529,6 +2573,10 @@ void CG_DrawActive(stereoFrame_t stereoView)
|
||||||
// clear around the rendered view if sized down
|
// clear around the rendered view if sized down
|
||||||
CG_TileClear();
|
CG_TileClear();
|
||||||
|
|
||||||
|
// NiceAss: Wallhack protection
|
||||||
|
if (cg.snap->ps.pm_type == PM_NORMAL)
|
||||||
|
CG_DrawBigPolygon();
|
||||||
|
|
||||||
// offset vieworg appropriately if we're doing stereo separation
|
// offset vieworg appropriately if we're doing stereo separation
|
||||||
VectorCopy(cg.refdef.vieworg, baseOrg);
|
VectorCopy(cg.refdef.vieworg, baseOrg);
|
||||||
if (separation != 0) {
|
if (separation != 0) {
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.124 2002/08/29 14:24:43 niceass
|
||||||
|
// new wallhack thing
|
||||||
|
//
|
||||||
// Revision 1.123 2002/08/29 04:42:40 blaze
|
// Revision 1.123 2002/08/29 04:42:40 blaze
|
||||||
// Anti OGC code
|
// Anti OGC code
|
||||||
//
|
//
|
||||||
|
@ -1051,6 +1054,8 @@ typedef struct {
|
||||||
qhandle_t charsetPropB;
|
qhandle_t charsetPropB;
|
||||||
qhandle_t whiteShader;
|
qhandle_t whiteShader;
|
||||||
|
|
||||||
|
qhandle_t blackHackShader;
|
||||||
|
|
||||||
qhandle_t redCubeModel;
|
qhandle_t redCubeModel;
|
||||||
qhandle_t blueCubeModel;
|
qhandle_t blueCubeModel;
|
||||||
qhandle_t redCubeIcon;
|
qhandle_t redCubeIcon;
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.110 2002/08/29 14:25:13 niceass
|
||||||
|
// new wallhack thing
|
||||||
|
//
|
||||||
// Revision 1.109 2002/08/29 10:26:46 jbravo
|
// Revision 1.109 2002/08/29 10:26:46 jbravo
|
||||||
// Blaze's commit nuked my keanu code and Suicide code in this file only.
|
// Blaze's commit nuked my keanu code and Suicide code in this file only.
|
||||||
// Its fixed now.
|
// Its fixed now.
|
||||||
|
@ -1721,6 +1724,8 @@ static void CG_RegisterGraphics(void)
|
||||||
cgs.media.tracerShader = trap_R_RegisterShader("gfx/misc/tracer");
|
cgs.media.tracerShader = trap_R_RegisterShader("gfx/misc/tracer");
|
||||||
cgs.media.selectShader = trap_R_RegisterShader("gfx/2d/select");
|
cgs.media.selectShader = trap_R_RegisterShader("gfx/2d/select");
|
||||||
|
|
||||||
|
cgs.media.blackHackShader = trap_R_RegisterShader("gfx/misc/black");
|
||||||
|
|
||||||
for (i = 0; i < NUM_CROSSHAIRS; i++) {
|
for (i = 0; i < NUM_CROSSHAIRS; i++) {
|
||||||
// cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) );
|
// cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) );
|
||||||
cgs.media.crosshairShader[i] = trap_R_RegisterShaderNoMip(va("gfx/2d/IDcrosshair%c", 'a' + i));
|
cgs.media.crosshairShader[i] = trap_R_RegisterShaderNoMip(va("gfx/2d/IDcrosshair%c", 'a' + i));
|
||||||
|
|
Loading…
Reference in a new issue