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.83 by root, Mon Apr 2 18:04:47 2007 UTC vs.
Revision 1.87 by root, Thu Apr 19 11:12:46 2007 UTC

148{ 148{
149 client &socket = *pl->ns; 149 client &socket = *pl->ns;
150 object *ob = pl->ob; 150 object *ob = pl->ob;
151 char buf[MAX_BUF]; /* eauugggh */ 151 char buf[MAX_BUF]; /* eauugggh */
152 152
153 if (socket.force_newmap) 153 if (socket.current_map != ob->map || socket.force_newmap)
154 {
155 // force newmap is used for clients that do not redraw their map
156 // after image uploads.
157 socket.current_map = ob->map;
158 clear_map (pl);
159 }
160 else if (socket.current_map != ob->map)
161 { 154 {
162 clear_map (pl); 155 clear_map (pl);
163 socket.current_map = ob->map; 156 socket.current_map = ob->map;
164 157
165 if (socket.mapinfocmd) 158 if (socket.mapinfocmd)
505 */ 498 */
506void 499void
507AskSmooth (char *buf, int len, client *ns) 500AskSmooth (char *buf, int len, client *ns)
508{ 501{
509 ns->send_face (atoi (buf)); 502 ns->send_face (atoi (buf));
503 ns->flush_fx ();
510} 504}
511 505
512/** 506/**
513 * This handles the general commands from the client (ie, north, fire, cast, 507 * This handles the general commands from the client (ie, north, fire, cast,
514 * etc.) 508 * etc.)
1189 1183
1190 mapspace &ms = m->at (nx, ny); 1184 mapspace &ms = m->at (nx, ny);
1191 1185
1192 if (socket.extmap) 1186 if (socket.extmap)
1193 { 1187 {
1194 uint8 stat_hp = 0; 1188 uint8 stat_hp = 0;
1195 uint8 stat_width = 0; 1189 uint8 stat_width = 0;
1196 uint8 flags = 0; 1190 uint8 flags = 0;
1197 UUID player = 0; 1191 tag_t player = 0;
1198 1192
1199 // send hp information, if applicable 1193 // send hp information, if applicable
1200 if (object *op = ms.faces_obj [0]) 1194 if (object *op = ms.faces_obj [0])
1201 { 1195 {
1202 if (op->head || op->invisible) 1196 if (op->head || op->invisible)
1243 1237
1244 mask |= 0x8; 1238 mask |= 0x8;
1245 *last_ext |= 0x80; 1239 *last_ext |= 0x80;
1246 last_ext = &sl[sl.length ()]; 1240 last_ext = &sl[sl.length ()];
1247 1241
1248 sl << uint8 (0x47) << uint8 (8) << (uint64)player; 1242 sl << uint8 (0x47) << uint8 (4) << (uint32)player;
1249 } 1243 }
1250 1244
1251 if (lastcell.flags != flags) 1245 if (lastcell.flags != flags)
1252 { 1246 {
1253 lastcell.flags = flags; 1247 lastcell.flags = flags;
1326 esl.reset (eoldlen); 1320 esl.reset (eoldlen);
1327 } 1321 }
1328 } /* else this is a viewable space */ 1322 } /* else this is a viewable space */
1329 } /* for x loop */ 1323 } /* for x loop */
1330 } /* for y loop */ 1324 } /* for y loop */
1325
1326 socket.flush_fx ();
1331 1327
1332 /* Verify that we in fact do need to send this */ 1328 /* Verify that we in fact do need to send this */
1333 if (socket.ext_mapinfos) 1329 if (socket.ext_mapinfos)
1334 { 1330 {
1335 if (!(sl.length () > startlen || socket.sent_scroll)) 1331 if (!(sl.length () > startlen || socket.sent_scroll))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines