--- deliantra/server/socket/item.C 2007/06/05 13:05:03 1.47 +++ deliantra/server/socket/item.C 2007/06/08 09:18:31 1.48 @@ -896,19 +896,23 @@ void LookAt (char *buf, int len, player *pl) { - int dx, dy; char *cp; - dx = atoi (buf); + int dx = atoi (buf); if (!(cp = strchr (buf, ' '))) return; - dy = atoi (cp); - if (fabs (dx) > pl->ns->mapx / 2 || fabs (dy) > pl->ns->mapy / 2) - return; + int dy = atoi (cp); - if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]) - return; + if (player *opl = pl->observe->contr) + if (client *ns = opl->ns) + { + if (fabs (dx) > ns->mapx / 2 || fabs (dy) > ns->mapy / 2) + return; + + if (opl->blocked_los[dx + ns->mapx / 2][dy + ns->mapy / 2]) + return; + } look_at (pl, dx, dy); }