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.12 by root, Tue Aug 29 08:01:38 2006 UTC vs.
Revision 1.15 by pippijn, Thu Sep 7 20:03:21 2006 UTC

1/* 1/*
2 * static char *rcsid_init_c = 2 * static char *rcsid_init_c =
3 * "$Id: request.C,v 1.12 2006/08/29 08:01:38 root Exp $"; 3 * "$Id: request.C,v 1.15 2006/09/07 20:03:21 pippijn 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
241void MapInfoCmd (char *buf, int len, player *pl) 241void MapInfoCmd (char *buf, int len, player *pl)
242{ 242{
243 // <mapinfo tag spatial tile-path 243 // <mapinfo tag spatial tile-path
244 // >mapinfo tag spatial flags x y w h hash 244 // >mapinfo tag spatial flags x y w h hash
245 245
246 char bigbuf[MAX_BUF], *cp, *token; 246 char bigbuf[MAX_BUF], *token;
247 247
248 token = buf; 248 token = buf;
249 // copy token 249 // copy token
250 if (!(buf = strchr (buf, ' '))) 250 if (!(buf = strchr (buf, ' ')))
251 return; 251 return;
594 * again. 594 * again.
595 */ 595 */
596 if ((!FindSmooth (face, &smoothface)) && 596 if ((!FindSmooth (face, &smoothface)) &&
597 (!FindSmooth ( smooth_face->number, &smoothface))) { 597 (!FindSmooth ( smooth_face->number, &smoothface))) {
598 598
599 LOG(llevError,"could not findsmooth for %d. Neither default (%s)\n",face,smooth_face->name); 599 LOG(llevError,"could not findsmooth for %d. Neither default (%s)\n", face, &smooth_face->name);
600 ns->faces_sent[face] |= NS_FACESENT_SMOOTH; 600 ns->faces_sent[face] |= NS_FACESENT_SMOOTH;
601 return; 601 return;
602 } 602 }
603 603
604 if (!(ns->faces_sent[smoothface] & NS_FACESENT_FACE)) 604 if (!(ns->faces_sent[smoothface] & NS_FACESENT_FACE))
1874 1874
1875 if (op->type == PLAYER && op != pl) 1875 if (op->type == PLAYER && op != pl)
1876 player = op->count; 1876 player = op->count;
1877 } 1877 }
1878 1878
1879 if (lastcell.stat_hp != stat_hp && 0) 1879 if (lastcell.stat_hp != stat_hp)
1880 { 1880 {
1881 lastcell.stat_hp = stat_hp; 1881 lastcell.stat_hp = stat_hp;
1882 1882
1883 mask |= 0x8; 1883 mask |= 0x8;
1884 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 5); 1884 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 5);
1889 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 6); 1889 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 6);
1890 SockList_AddChar (&sl, stat_width); 1890 SockList_AddChar (&sl, stat_width);
1891 } 1891 }
1892 } 1892 }
1893 1893
1894 if (lastcell.player != player && 0) 1894 if (lastcell.player != player)
1895 { 1895 {
1896 lastcell.player = player; 1896 lastcell.player = player;
1897 mask |= 0x8; 1897 mask |= 0x8;
1898 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 0x47); 1898 *last_ext |= 0x80; last_ext = sl.buf + sl.len; SockList_AddChar (&sl, 0x47);
1899 SockList_AddChar (&sl, 4); 1899 SockList_AddChar (&sl, 4);
2117 2117
2118 sl.buf = (unsigned char*) malloc(MAXSOCKBUF); 2118 sl.buf = (unsigned char*) malloc(MAXSOCKBUF);
2119 strcpy((char*)sl.buf,"replyinfo skill_info\n"); 2119 strcpy((char*)sl.buf,"replyinfo skill_info\n");
2120 for (i=1; i< NUM_SKILLS; i++) { 2120 for (i=1; i< NUM_SKILLS; i++) {
2121 sprintf((char*)sl.buf + strlen((char*)sl.buf), "%d:%s\n", i + CS_STAT_SKILLINFO, 2121 sprintf((char*)sl.buf + strlen((char*)sl.buf), "%d:%s\n", i + CS_STAT_SKILLINFO,
2122 skill_names[i]); 2122 &skill_names[i]);
2123 } 2123 }
2124 sl.len = strlen((char*)sl.buf); 2124 sl.len = strlen((char*)sl.buf);
2125 if (sl.len >= MAXSOCKBUF) { 2125 if (sl.len >= MAXSOCKBUF) {
2126 LOG(llevError,"Buffer overflow in send_skill_info!\n"); 2126 LOG(llevError,"Buffer overflow in send_skill_info!\n");
2127 fatal(0); 2127 fatal(0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines