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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.62 by root, Mon Dec 25 11:25:49 2006 UTC vs.
Revision 1.63 by root, Mon Dec 25 17:11:17 2006 UTC

250} 250}
251 251
252void 252void
253player::disconnect () 253player::disconnect ()
254{ 254{
255 if (!ns)
256 return;
257
258 //TODO: don't be so harsh and destroy :) 255 //TODO: don't be so harsh and destroy :)
256 if (ns)
259 destroy (); 257 destroy ();
260
261 ns->pl = 0;
262 ns = 0;
263} 258}
264 259
265// the need for this function can be explained 260// the need for this function can be explained
266// by load_object not returning the object 261// by load_object not returning the object
267void 262void
348 if (ob) 343 if (ob)
349 ob->destroy (true); 344 ob->destroy (true);
350 345
351 if (ns) 346 if (ns)
352 { 347 {
348 client *ns = this->ns;
353 ns->send_packet ("goodbye"); 349 ns->send_packet ("goodbye");
354 ns->flush (); 350 ns->flush ();
355 ns->pl = 0; 351 ns->pl = 0;
352 this->ns = 0;
356 ns->destroy (); 353 ns->destroy ();
357 } 354 }
358 355
359 attachable::do_destroy (); 356 attachable::do_destroy ();
360} 357}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines