1 | |
1 | |
2 | /* |
2 | /* |
3 | * static char *rcsid_loop_c = |
3 | * static char *rcsid_loop_c = |
4 | * "$Id: loop.c,v 1.3 2006/04/17 06:25:35 root Exp $"; |
4 | * "$Id: loop.c,v 1.4 2006/04/17 08:18:05 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 | |
… | |
… | |
327 | { |
327 | { |
328 | int len=0,i,cnt; |
328 | int len=0,i,cnt; |
329 | unsigned char *data; |
329 | unsigned char *data; |
330 | |
330 | |
331 | /* Loop through this - maybe we have several complete packets here. */ |
331 | /* Loop through this - maybe we have several complete packets here. */ |
332 | // limit to a efw commands only, though, as to not monopolise the server |
332 | // limit to a few commands only, though, as to not monopolise the server |
333 | for (cnt = 16; --cnt; ) { |
333 | for (cnt = 16; --cnt; ) { |
334 | /* If it is a player, and they don't have any speed left, we |
334 | /* If it is a player, and they don't have any speed left, we |
335 | * return, and will read in the data when they do have time. |
335 | * return, and will read in the data when they do have time. |
336 | */ |
336 | */ |
337 | if (pl && pl->state==ST_PLAYING && pl->ob != NULL && pl->ob->speed_left < 0) { |
337 | if (pl && pl->state==ST_PLAYING && pl->ob != NULL && pl->ob->speed_left < 0) { |