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.37 by root, Mon Mar 19 13:28:16 2007 UTC vs.
Revision 1.40 by root, Tue Apr 10 09:35:24 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 "\n"
264 "\n"
265 "***\n"
266 "*** WARNING:\n"
267 "*** Your client does not support face/image caching,\n"
268 "*** or it has been disabled. Face caching is mandatory\n"
269 "*** so please enable it or use a newer client.\n"
270 "***\n"
271 "*** To enable it, look at your client preferences and reconnect:\n"
272 "***\n"
273 "*** CFPlus: all known versions automatically enable the facecache.\n"
274 "*** cfclient: use the -cache commandline option.\n"
275 "*** cfclient: map will not redraw automatically (bug).\n"
276 "*** gcfclient: use -cache commandline option, or enable\n"
277 "*** gcfclient: Client=>Configure=>Map & Image=>Cache Images.\n"
278 "*** jcrossclient: your client is broken, use CFPlus or gcfclient.\n"
279 "***\n"
280 "***\n",
281 NDI_RED
282 );
283 //return;
284 return send_image (facenum); 263 return send_image (facenum);
264
265 if (fxix)
266 {
267 fxface.push_back (facenum);
268 return;
285 } 269 }
286 270
287 packet sl; 271 packet sl;
288 272
289 if (force_face0) 273 if (force_face0)
295 279
296 // how lame 280 // how lame
297 print_facename (sl, *d); 281 print_facename (sl, *d);
298 send_packet (sl); 282 send_packet (sl);
299 283
284 if (EMI_smooth)
285 {
300 faceinfo *f = face_info (facenum); 286 faceinfo *f = face_info (facenum);
301 if (f->smooth && EMI_smooth) 287
302 { 288 if (f->smooth)
289 {
303 send_face (f->smooth); 290 send_face (f->smooth);
304 291
305 packet sl ("smooth"); 292 packet sl ("smooth");
306 293
307 sl << uint16 (facenum) 294 sl << uint16 (facenum)
308 << uint16 (f->smooth); 295 << uint16 (f->smooth);
309 296
310 send_packet (sl); 297 send_packet (sl);
298 }
299 }
300}
301
302void client::flush_fx ()
303{
304 while (!fxface.empty ())
305 {
306 packet fx ("fx");
307 packet sx ("sx");
308
309 do
310 {
311 faceidx facenum = fxface.back (); fxface.pop_back ();
312
313 const facedata *d = face_data (facenum, faceset);
314
315 if (d)
316 {
317 fx << ber32 (facenum)
318 << data8 (d->chksum, CHKSUM_SIZE);
319
320 if (smoothing)
321 {
322 faceinfo *f = face_info (facenum);
323
324 if (f->smooth)
325 {
326 send_face (f->smooth);
327 sx << ber32 (facenum)
328 << ber32 (f->smooth)
329 << ber32 (f->smoothlevel);
330 }
331 }
332 }
333 }
334 while (!fxface.empty ()
335 && fx.room () > ber32::size + CHKSUM_SIZE + 1
336 && sx.room () > ber32::size * 3);
337
338 send_packet (fx);
339 if (sx.length () > 3) send_packet (sx);
311 } 340 }
312} 341}
313 342
314void 343void
315client::send_image (faceidx facenum) 344client::send_image (faceidx facenum)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines