mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Slightly less broken .view2 support
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2552 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
50bfdb95e4
commit
dcd2f7d8e0
2 changed files with 7 additions and 9 deletions
|
@ -125,7 +125,7 @@ qboolean Cam_DrawPlayer(int pnum, int playernum)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (selfcam == 1)
|
if (selfcam == 1 && r_secondaryview != 3)
|
||||||
if (playernum == (cl.viewentity[pnum]?cl.viewentity[pnum]-1:(cl.playernum[pnum])))
|
if (playernum == (cl.viewentity[pnum]?cl.viewentity[pnum]-1:(cl.playernum[pnum])))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ when crossing a water boudnary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef SIDEVIEWS
|
#ifdef SIDEVIEWS
|
||||||
cvar_t vsec_enabled[SIDEVIEWS] = {SCVAR("v2_enabled", "0"), SCVAR("v3_enabled", "0"), SCVAR("v4_enabled", "0"), SCVAR("v5_enabled", "0")};
|
cvar_t vsec_enabled[SIDEVIEWS] = {SCVAR("v2_enabled", "2"), SCVAR("v3_enabled", "0"), SCVAR("v4_enabled", "0"), SCVAR("v5_enabled", "0")};
|
||||||
cvar_t vsec_x[SIDEVIEWS] = {SCVAR("v2_x", "0"), SCVAR("v3_x", "0.25"), SCVAR("v4_x", "0.5"), SCVAR("v5_x", "0.75")};
|
cvar_t vsec_x[SIDEVIEWS] = {SCVAR("v2_x", "0"), SCVAR("v3_x", "0.25"), SCVAR("v4_x", "0.5"), SCVAR("v5_x", "0.75")};
|
||||||
cvar_t vsec_y[SIDEVIEWS] = {SCVAR("v2_y", "0"), SCVAR("v3_y", "0"), SCVAR("v4_y", "0"), SCVAR("v5_y", "0")};
|
cvar_t vsec_y[SIDEVIEWS] = {SCVAR("v2_y", "0"), SCVAR("v3_y", "0"), SCVAR("v4_y", "0"), SCVAR("v5_y", "0")};
|
||||||
cvar_t vsec_scalex[SIDEVIEWS] = {SCVAR("v2_scalex", "0.25"), SCVAR("v3_scalex", "0.25"), SCVAR("v4_scalex", "0.25"), SCVAR("v5_scalex", "0.25")};
|
cvar_t vsec_scalex[SIDEVIEWS] = {SCVAR("v2_scalex", "0.25"), SCVAR("v3_scalex", "0.25"), SCVAR("v4_scalex", "0.25"), SCVAR("v5_scalex", "0.25")};
|
||||||
|
@ -1397,16 +1397,10 @@ void V_RenderPlayerViews(int plnum)
|
||||||
VectorCopy(desired_position[plnum], r_refdef.vieworg);
|
VectorCopy(desired_position[plnum], r_refdef.vieworg);
|
||||||
R_RenderView ();
|
R_RenderView ();
|
||||||
vid.recalc_refdef=true;
|
vid.recalc_refdef=true;
|
||||||
r_secondaryview = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
gl_ztrickdisabled&=~16;
|
gl_ztrickdisabled&=~16;
|
||||||
|
|
||||||
r_secondaryview = 2;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef SIDEVIEWS
|
#ifdef SIDEVIEWS
|
||||||
/* //adjust main view height to strip off the rearviews at the top
|
/* //adjust main view height to strip off the rearviews at the top
|
||||||
|
@ -1420,7 +1414,9 @@ void V_RenderPlayerViews(int plnum)
|
||||||
gl_ztrickdisabled&=~1;
|
gl_ztrickdisabled&=~1;
|
||||||
#endif
|
#endif
|
||||||
for (viewnum = 0; viewnum < SIDEVIEWS; viewnum++)
|
for (viewnum = 0; viewnum < SIDEVIEWS; viewnum++)
|
||||||
if (vsec_enabled[viewnum].value && vsec_scalex[viewnum].value>0&&vsec_scaley[viewnum].value>0 && (cls.allow_rearview||(cl.stats[plnum][STAT_VIEW2]&&viewnum==0))) //will the server allow us to?
|
if (vsec_scalex[viewnum].value>0&&vsec_scaley[viewnum].value>0
|
||||||
|
&& ((vsec_enabled[viewnum].value && vsec_enabled[viewnum].value != 2 && cls.allow_rearview) //rearview if v2_enabled = 1 and not 2
|
||||||
|
|| (vsec_enabled[viewnum].value && cl.stats[plnum][STAT_VIEW2]&&viewnum==0))) //v2 enabled if v2_enabled is non-zero
|
||||||
{
|
{
|
||||||
vrect_t oldrect;
|
vrect_t oldrect;
|
||||||
vec3_t oldangles;
|
vec3_t oldangles;
|
||||||
|
@ -1484,6 +1480,7 @@ void V_RenderPlayerViews(int plnum)
|
||||||
r_refdef.viewangles[2]=e->angles[2];//*s+(1-s)*e->msg_angles[1][2];
|
r_refdef.viewangles[2]=e->angles[2];//*s+(1-s)*e->msg_angles[1][2];
|
||||||
r_refdef.viewangles[PITCH] *= -1;
|
r_refdef.viewangles[PITCH] *= -1;
|
||||||
|
|
||||||
|
r_secondaryview = 3; //show the player
|
||||||
|
|
||||||
R_RenderView ();
|
R_RenderView ();
|
||||||
// r_framecount = old_framecount;
|
// r_framecount = old_framecount;
|
||||||
|
@ -1513,6 +1510,7 @@ void V_RenderPlayerViews(int plnum)
|
||||||
vid.recalc_refdef=true;
|
vid.recalc_refdef=true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
r_secondaryview = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void V_RenderView (void)
|
void V_RenderView (void)
|
||||||
|
|
Loading…
Reference in a new issue