ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/item.C
(Generate patch)

Comparing deliantra/server/socket/item.C (file contents):
Revision 1.47 by root, Tue Jun 5 13:05:03 2007 UTC vs.
Revision 1.48 by root, Fri Jun 8 09:18:31 2007 UTC

894 894
895/** Client wants to look at some object. Lets do so. */ 895/** Client wants to look at some object. Lets do so. */
896void 896void
897LookAt (char *buf, int len, player *pl) 897LookAt (char *buf, int len, player *pl)
898{ 898{
899 int dx, dy;
900 char *cp; 899 char *cp;
901 900
902 dx = atoi (buf); 901 int dx = atoi (buf);
903 if (!(cp = strchr (buf, ' '))) 902 if (!(cp = strchr (buf, ' ')))
904 return; 903 return;
905 904
906 dy = atoi (cp); 905 int dy = atoi (cp);
906
907 if (player *opl = pl->observe->contr)
908 if (client *ns = opl->ns)
909 {
907 if (fabs (dx) > pl->ns->mapx / 2 || fabs (dy) > pl->ns->mapy / 2) 910 if (fabs (dx) > ns->mapx / 2 || fabs (dy) > ns->mapy / 2)
908 return; 911 return;
909 912
910 if (pl->blocked_los[dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]) 913 if (opl->blocked_los[dx + ns->mapx / 2][dy + ns->mapy / 2])
911 return; 914 return;
915 }
912 916
913 look_at (pl, dx, dy); 917 look_at (pl, dx, dy);
914} 918}
915 919
916/** Move an object to a new location */ 920/** Move an object to a new location */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines