mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 15:12:19 +00:00
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:
parent
f5b9ca55c9
commit
6139416dea
1 changed files with 0 additions and 12 deletions
|
@ -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[0] = out[0]*r_refdef.vrect.width + r_refdef.vrect.x;
|
||||||
out[1] = out[1]*r_refdef.vrect.height + r_refdef.vrect.y;
|
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)
|
if (tempv[3] < 0)
|
||||||
out[2] *= -1;
|
out[2] *= -1;
|
||||||
}
|
}
|
||||||
|
@ -1763,12 +1757,6 @@ static void QCBUILTIN PF_cs_unproject (pubprogfuncs_t *prinst, struct globalvars
|
||||||
|
|
||||||
float v[4], tempv[4];
|
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);
|
tx = ((tx-r_refdef.vrect.x)/r_refdef.vrect.width);
|
||||||
ty = ((ty-r_refdef.vrect.y)/r_refdef.vrect.height);
|
ty = ((ty-r_refdef.vrect.y)/r_refdef.vrect.height);
|
||||||
ty = 1-ty;
|
ty = 1-ty;
|
||||||
|
|
Loading…
Reference in a new issue