Fix xonotic crosshair position.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5160 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2017-11-04 02:52:29 +00:00
parent f5b9ca55c9
commit 6139416dea

View file

@ -1741,12 +1741,6 @@ static void QCBUILTIN PF_cs_project (pubprogfuncs_t *prinst, struct globalvars_s
out[0] = out[0]*r_refdef.vrect.width + r_refdef.vrect.x;
out[1] = out[1]*r_refdef.vrect.height + r_refdef.vrect.y;
if (csqc_isdarkplaces)
{
out[0] *= (float)vid.pixelwidth / vid.width;
out[1] *= (float)vid.pixelheight / vid.height;
}
if (tempv[3] < 0)
out[2] *= -1;
}
@ -1763,12 +1757,6 @@ static void QCBUILTIN PF_cs_unproject (pubprogfuncs_t *prinst, struct globalvars
float v[4], tempv[4];
if (csqc_isdarkplaces)
{
tx *= (float)vid.width / vid.pixelwidth;
ty *= (float)vid.height / vid.pixelheight;
}
tx = ((tx-r_refdef.vrect.x)/r_refdef.vrect.width);
ty = ((ty-r_refdef.vrect.y)/r_refdef.vrect.height);
ty = 1-ty;