Transform 2D center was using short. Not good enough when it's it's way off screen. Switched to ints, that fixed the bug in the tracker.
Switching to floats would probably be safer in the long term, but too many things to test to do that now.
This commit is contained in:
@@ -842,8 +842,8 @@ void setNearestAxis(TransInfo *t)
|
||||
float zfac;
|
||||
float mvec[3], axis[3], proj[3];
|
||||
float len[3];
|
||||
int i, icoord[2];
|
||||
short coord[2];
|
||||
int i;
|
||||
|
||||
t->con.mode &= ~CON_AXIS0;
|
||||
t->con.mode &= ~CON_AXIS1;
|
||||
@@ -871,10 +871,10 @@ void setNearestAxis(TransInfo *t)
|
||||
VecMulf(axis, zfac);
|
||||
/* now we can project to get window coordinate */
|
||||
VecAddf(axis, axis, t->con.center);
|
||||
project_short_noclip(axis, coord);
|
||||
project_int(axis, icoord);
|
||||
|
||||
axis[0] = (float)(coord[0] - t->center2d[0]);
|
||||
axis[1] = (float)(coord[1] - t->center2d[1]);
|
||||
axis[0] = (float)(icoord[0] - t->center2d[0]);
|
||||
axis[1] = (float)(icoord[1] - t->center2d[1]);
|
||||
axis[2] = 0.0f;
|
||||
|
||||
if (Normalise(axis) != 0.0f) {
|
||||
|
||||
Reference in New Issue
Block a user