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.1 by elmex, Sun Aug 13 17:16:00 2006 UTC vs.
Revision 1.2 by root, Tue Aug 29 08:01:35 2006 UTC

1/* 1/*
2 * static char *rcsid_player_c = 2 * static char *rcsid_player_c =
3 * "$Id: player.C,v 1.1 2006/08/13 17:16:00 elmex Exp $"; 3 * "$Id: player.C,v 1.2 2006/08/29 08:01:35 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
30#include <funcpoint.h> 30#include <funcpoint.h>
31 31
32void free_player(player *pl) { 32void free_player(player *pl) {
33 33
34 if (first_player!=pl) { 34 if (first_player!=pl) {
35 player *prev=first_player; 35 player *prev=first_player;
36 while(prev!=NULL&&prev->next!=NULL&&prev->next!=pl) 36 while(prev!=NULL&&prev->next!=NULL&&prev->next!=pl)
37 prev=prev->next; 37 prev=prev->next;
38 if(prev->next!=pl) { 38 if(prev->next!=pl) {
39 LOG(llevError,"Free_player: Can't find previous player.\n"); 39 LOG(llevError,"Free_player: Can't find previous player.\n");
40 exit(1); 40 exit(1);
41 } 41 }
42 prev->next=pl->next; 42 prev->next=pl->next;
43 } else first_player=pl->next; 43 } else first_player=pl->next;
44 44
45 if(pl->ob != NULL) { 45 if(pl->ob != NULL) {
46 if (!QUERY_FLAG(pl->ob, FLAG_REMOVED)) remove_ob(pl->ob); 46 if (!QUERY_FLAG(pl->ob, FLAG_REMOVED)) remove_ob(pl->ob);
47 free_object(pl->ob); 47 free_object(pl->ob);
48 } 48 }
49 /* Clear item stack */ 49 /* Clear item stack */
50 if (pl->stack_items) free( pl->stack_items ); 50 if (pl->stack_items) free( pl->stack_items );
51 51
52 free(pl->socket.faces_sent); 52 free(pl->socket.faces_sent);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines