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

Comparing deliantra/server/socket/loop.C (file contents):
Revision 1.6 by root, Sun Sep 10 13:43:33 2006 UTC vs.
Revision 1.9 by root, Tue Dec 12 20:53:03 2006 UTC

1
2/*
3 * static char *rcsid_loop_c =
4 * "$Id: loop.C,v 1.6 2006/09/10 13:43:33 root Exp $";
5 */
6
7/* 1/*
8 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
9 3
10 Copyright (C) 2002-2003 Mark Wedel & The Crossfire Development Team 4 Copyright (C) 2002-2003 Mark Wedel & The Crossfire Development Team
11 Copyright (C) 1992 Frank Tore Johansen 5 Copyright (C) 1992 Frank Tore Johansen
22 16
23 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 20
27 The author can be reached via e-mail to crossfire-devel@real-time.com 21 The author can be reached via e-mail to <crossfire@schmorp.de>
28*/ 22*/
29 23
30/** 24/**
31 * \file 25 * \file
32 * Main client/server loops. 26 * Main client/server loops.
43#ifndef __CEXTRACT__ 37#ifndef __CEXTRACT__
44# include <sproto.h> 38# include <sproto.h>
45# include <sockproto.h> 39# include <sockproto.h>
46#endif 40#endif
47 41
48#ifndef WIN32 /* ---win32 exclude unix headers */
49# include <sys/types.h> 42#include <sys/types.h>
50# include <sys/time.h> 43#include <sys/time.h>
51# include <sys/socket.h> 44#include <sys/socket.h>
52# include <netinet/in.h> 45#include <netinet/in.h>
53# include <netdb.h> 46#include <netdb.h>
54#endif /* end win32 */
55 47
56#ifdef HAVE_UNISTD_H 48#ifdef HAVE_UNISTD_H
57# include <unistd.h> 49# include <unistd.h>
58#endif 50#endif
59 51
385 377
386 save_player (pl->ob, 0); 378 save_player (pl->ob, 0);
387 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 379 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
388 { 380 {
389 terminate_all_pets (pl->ob); 381 terminate_all_pets (pl->ob);
390 remove_ob (pl->ob); 382 pl->ob->remove ();
391 } 383 }
392 leave (pl, 1); 384 leave (pl, 1);
393 final_free_player (pl); 385 final_free_player (pl);
394 pl = npl; 386 pl = npl;
395 } 387 }
537 { 529 {
538 save_player (pl->ob, 0); 530 save_player (pl->ob, 0);
539 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 531 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
540 { 532 {
541 terminate_all_pets (pl->ob); 533 terminate_all_pets (pl->ob);
542 remove_ob (pl->ob); 534 pl->ob->remove ();
543 } 535 }
544 leave (pl, 1); 536 leave (pl, 1);
545 final_free_player (pl); 537 final_free_player (pl);
546 } 538 }
547 else 539 else
556 { 548 {
557 save_player (pl->ob, 0); 549 save_player (pl->ob, 0);
558 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) 550 if (!QUERY_FLAG (pl->ob, FLAG_REMOVED))
559 { 551 {
560 terminate_all_pets (pl->ob); 552 terminate_all_pets (pl->ob);
561 remove_ob (pl->ob); 553 pl->ob->remove ();
562 } 554 }
563 leave (pl, 1); 555 leave (pl, 1);
564 final_free_player (pl); 556 final_free_player (pl);
565 } 557 }
566 else 558 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines