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.5 by root, Thu Sep 14 22:34:00 2006 UTC vs.
Revision 1.6 by root, Wed Sep 27 00:36:08 2006 UTC

32 { 32 {
33 player *prev = first_player; 33 player *prev = first_player;
34 34
35 while (prev != NULL && prev->next != NULL && prev->next != pl) 35 while (prev != NULL && prev->next != NULL && prev->next != pl)
36 prev = prev->next; 36 prev = prev->next;
37
37 if (prev->next != pl) 38 if (prev->next != pl)
38 { 39 {
39 LOG (llevError, "Free_player: Can't find previous player.\n"); 40 LOG (llevError, "Free_player: Can't find previous player.\n");
40 exit (1); 41 exit (1);
41 } 42 }
43
42 prev->next = pl->next; 44 prev->next = pl->next;
43 } 45 }
44 else 46 else
45 first_player = pl->next; 47 first_player = pl->next;
46 48
47 if (pl->ob != NULL) 49 if (pl->ob)
48 { 50 {
49 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 51 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
50 remove_ob (pl->ob); 52 remove_ob (pl->ob);
51 free_object (pl->ob); 53
54 pl->ob->contr = 0;
55 pl->ob->destroy ();
52 } 56 }
57
53 /* Clear item stack */ 58 /* Clear item stack */
54 if (pl->stack_items) 59 if (pl->stack_items)
55 free (pl->stack_items); 60 free (pl->stack_items);
56 61
57 free (pl->socket.faces_sent); 62 free (pl->socket.faces_sent);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines