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.7 by root, Fri Apr 28 16:24:03 2006 UTC vs.
Revision 1.9 by root, Sun Jun 11 15:02:17 2006 UTC

1 1
2/* 2/*
3 * static char *rcsid_loop_c = 3 * static char *rcsid_loop_c =
4 * "$Id: loop.c,v 1.7 2006/04/28 16:24:03 root Exp $"; 4 * "$Id: loop.c,v 1.9 2006/06/11 15:02:17 root Exp $";
5 */ 5 */
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
9 9
114 { "lookat", LookAt, 1}, 114 { "lookat", LookAt, 1},
115 { "lock", (func_uint8_int_pl)LockItem, 1}, 115 { "lock", (func_uint8_int_pl)LockItem, 1},
116 { "mark", (func_uint8_int_pl)MarkItem, 1}, 116 { "mark", (func_uint8_int_pl)MarkItem, 1},
117 { "mapredraw", MapRedrawCmd, 0}, /* Added: phil */ 117 { "mapredraw", MapRedrawCmd, 0}, /* Added: phil */
118 { "mapinfo", MapInfoCmd, 2}, /* CF+ */ 118 { "mapinfo", MapInfoCmd, 2}, /* CF+ */
119 { "ext", ExtCmd, 2}, /* CF+ */
119 { NULL, NULL, 0} /* terminator */ 120 { NULL, NULL, 0} /* terminator */
120}; 121};
121 122
122/** Face-related commands */ 123/** Face-related commands */
123static struct NsCmdMapping nscommands[] = { 124static struct NsCmdMapping nscommands[] = {
511 while (select(socket_info.max_filedescriptor, &readfs, NULL, NULL, &Timeout)==0); 512 while (select(socket_info.max_filedescriptor, &readfs, NULL, NULL, &Timeout)==0);
512 513
513 reset_sleep(); /* Or the game would go too fast */ 514 reset_sleep(); /* Or the game would go too fast */
514} 515}
515 516
517void flush_sockets(void)
518{
519 player *pl;
520
521 for (pl = first_player; pl != NULL; pl = pl->next)
522 if (pl->socket.status != Ns_Dead)
523 Socket_Flush (&pl->socket);
524}
516 525
517/** 526/**
518 * This checks the sockets for input and exceptions, does the right thing. 527 * This checks the sockets for input and exceptions, does the right thing.
519 * 528 *
520 * A bit of this code is grabbed out of socket.c 529 * A bit of this code is grabbed out of socket.c

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines