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

Comparing deliantra/server/socket/request.c (file contents):
Revision 1.2 by root, Sat Apr 15 22:38:31 2006 UTC vs.
Revision 1.3 by root, Sun Apr 16 02:56:46 2006 UTC

1/* 1/*
2 * static char *rcsid_init_c = 2 * static char *rcsid_init_c =
3 * "$Id: request.c,v 1.2 2006/04/15 22:38:31 root Exp $"; 3 * "$Id: request.c,v 1.3 2006/04/16 02:56:46 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
120 if (pl->socket.current_map != ob->map) 120 if (pl->socket.current_map != ob->map)
121 { 121 {
122 pl->socket.current_map = ob->map; 122 pl->socket.current_map = ob->map;
123 123
124 if (ob->map && ob->map->path [0]) 124 if (ob->map && ob->map->path [0])
125 {
126 int flags = 0;
127
128 if (ob->map->tile_map [0]) flags |= 1;
129 if (ob->map->tile_map [1]) flags |= 2;
130 if (ob->map->tile_map [2]) flags |= 4;
131 if (ob->map->tile_map [3]) flags |= 8;
132
125 snprintf (buf, MAX_BUF, "mapinfo current %d %d %d %d %s", 133 snprintf (buf, MAX_BUF, "mapinfo current %d %d %d %d %d %s",
126 ob->x, ob->y, 134 flags, ob->x, ob->y,
127 ob->map->width, ob->map->height, ob->map->path); 135 ob->map->width, ob->map->height, ob->map->path);
136 }
128 else 137 else
129 snprintf (buf, MAX_BUF, "mapinfo current"); 138 snprintf (buf, MAX_BUF, "mapinfo current");
130 139
131 Write_String_To_Socket (&pl->socket, buf, strlen (buf)); 140 Write_String_To_Socket (&pl->socket, buf, strlen (buf));
132 } 141 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines