1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* hack.track.c - version 1.0.2 */
3 /* $FreeBSD: src/games/hack/hack.track.c,v 1.4 1999/11/16 10:26:38 marcel Exp $ */
4 /* $DragonFly: src/games/hack/hack.track.c,v 1.3 2006/08/21 19:45:32 pavalos Exp $ */
28 utrack[utpnt].x = u.ux;
29 utrack[utpnt].y = u.uy;
34 gettrack(int x, int y)
40 for (i = utpnt - 1; cnt--; i--) {
44 dst = (x - tc.x) * (x - tc.x) + (y - tc.y) * (y - tc.y);
46 return (dst ? &(utrack[i]) : 0);