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

Comparing deliantra/server/common/player.C (file contents):
Revision 1.6 by root, Wed Sep 27 00:36:08 2006 UTC vs.
Revision 1.9 by root, Thu Dec 14 04:30:32 2006 UTC

25#include <funcpoint.h> 25#include <funcpoint.h>
26 26
27void 27void
28free_player (player *pl) 28free_player (player *pl)
29{ 29{
30
31 if (first_player != pl) 30 if (first_player != pl)
32 { 31 {
33 player *prev = first_player; 32 player *prev = first_player;
34 33
35 while (prev != NULL && prev->next != NULL && prev->next != pl) 34 while (prev != NULL && prev->next != NULL && prev->next != pl)
46 else 45 else
47 first_player = pl->next; 46 first_player = pl->next;
48 47
49 if (pl->ob) 48 if (pl->ob)
50 { 49 {
51 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
52 remove_ob (pl->ob);
53
54 pl->ob->contr = 0; 50 pl->ob->contr = 0;
55 pl->ob->destroy (); 51 pl->ob->destroy ();
56 } 52 }
57 53
58 /* Clear item stack */ 54 /* Clear item stack */
59 if (pl->stack_items) 55 if (pl->stack_items)
60 free (pl->stack_items); 56 free (pl->stack_items);
61 57
62 free (pl->socket.faces_sent); 58 pl->socket->status = Ns_Dead;
59 pl->socket->pl = 0;
63 60
64 delete pl; 61 delete pl;
65} 62}
66 63
67 64

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines