if (hastarget == 1) { if (i_ex(target)) { x += (target.x - target.xprevious); y += (target.y - target.yprevious); } }