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.5 by root, Sun Sep 10 13:43:33 2006 UTC vs.
Revision 1.9 by root, Wed Sep 20 21:53:50 2006 UTC

1
2/*
3 * static char *rcsid_item_c =
4 * "$Id: item.C,v 1.5 2006/09/10 13:43:33 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
10 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 5 Copyright (C) 1992 Frank Tore Johansen
22 16
23 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 20
27 The author can be reached via e-mail to crossfire-devel@real-time.com 21 The author can be reached via e-mail to <crossfire@schmorp.de>
28*/ 22*/
29 23
30/** 24/**
31 * \file 25 * \file
32 * Client/server logic. 26 * Client/server logic.
683 int tag; 677 int tag;
684 object *op; 678 object *op;
685 679
686 tag = GetInt_String (data); 680 tag = GetInt_String (data);
687 op = esrv_get_ob_from_count (pl->ob, tag); 681 op = esrv_get_ob_from_count (pl->ob, tag);
682
688 if (!op) 683 if (!op)
689 { 684 {
690 new_draw_info (NDI_UNIQUE, 0, pl->ob, "Could not find object to mark"); 685 new_draw_info (NDI_UNIQUE, 0, pl->ob, "Could not find object to mark");
691 return; 686 return;
692 } 687 }
688
693 pl->mark = op; 689 pl->mark = op;
694 pl->mark_count = op->count;
695 new_draw_info_format (NDI_UNIQUE, 0, pl->ob, "Marked item %s", query_name (op)); 690 new_draw_info_format (NDI_UNIQUE, 0, pl->ob, "Marked item %s", query_name (op));
696} 691}
697 692
698 693
699/** 694/**
706look_at (object *op, int dx, int dy) 701look_at (object *op, int dx, int dy)
707{ 702{
708 object *tmp; 703 object *tmp;
709 int flag = 0; 704 int flag = 0;
710 sint16 x, y; 705 sint16 x, y;
711 mapstruct *m; 706 maptile *m;
712 707
713 x = op->x + dx; 708 x = op->x + dx;
714 y = op->y + dy; 709 y = op->y + dy;
715 710
716 if (out_of_map (op->map, x, y)) 711 if (out_of_map (op->map, x, y))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines