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

Comparing deliantra/server/socket/image.C (file contents):
Revision 1.33 by root, Wed Mar 14 16:23:26 2007 UTC vs.
Revision 1.39 by root, Tue Apr 3 00:21:38 2007 UTC

255 if (faces_sent[facenum]) 255 if (faces_sent[facenum])
256 return; 256 return;
257 257
258 faces_sent[facenum] = true; 258 faces_sent[facenum] = true;
259 259
260 // if for some reason we let a client without face caching connect,
261 // we better support that decision here and implement it.
260 if (!facecache) 262 if (!facecache)
261 {
262 send_drawinfo (
263 "*** Please enable image/face caching in preferences or use a client that supports it.\n",
264 NDI_RED
265 );
266 return send_image (facenum); 263 return send_image (facenum);
264
265 if (fxix)
266 {
267 fxface.push_back (facenum);
268 return;
267 } 269 }
268 270
269 packet sl; 271 packet sl;
270 272
271 if (force_face0) 273 if (force_face0)
291 293
292 send_packet (sl); 294 send_packet (sl);
293 } 295 }
294} 296}
295 297
298void client::flush_fx ()
299{
300 while (!fxface.empty ())
301 {
302 packet sl ("fx");
303
304 do
305 {
306 faceidx facenum = fxface.back (); fxface.pop_back ();
307
308 const facedata *d = face_data (facenum, faceset);
309
310 if (d)
311 {
312 sl << ber32 (facenum)
313 << data8 (d->chksum, CHKSUM_SIZE);
314
315 faceinfo *f = face_info (facenum);
316 if (f->smooth && EMI_smooth)
317 sl << ber32 (f->smooth);
318 }
319 }
320 while (!fxface.empty () && sl.room () > CHKSUM_SIZE + 8 + 8);
321
322 send_packet (sl);
323 }
324}
325
296void 326void
297client::send_image (faceidx facenum) 327client::send_image (faceidx facenum)
298{ 328{
299 // never send face 0. ever. it does not exist. 329 // never send face 0. ever. it does not exist.
300 if (!facenum) 330 if (!facenum)
305 if (!d) 335 if (!d)
306 { 336 {
307 LOG (llevError, "client::send_image (%d) out of bounds??\n", facenum); 337 LOG (llevError, "client::send_image (%d) out of bounds??\n", facenum);
308 return; 338 return;
309 } 339 }
340
341 faces_sent[facenum] = true;
342
343 if (force_image_newmap)
344 force_newmap = true;
310 345
311 packet sl; 346 packet sl;
312 347
313 sl << (image2 ? "image2 " : "image ") 348 sl << (image2 ? "image2 " : "image ")
314 << uint32 (facenum); 349 << uint32 (facenum);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines