1 | /* |
1 | /* |
2 | * static char *rcsid_main_c = |
2 | * static char *rcsid_main_c = |
3 | * "$Id: main.C,v 1.20 2006/09/04 11:08:00 root Exp $"; |
3 | * "$Id: main.C,v 1.22 2006/09/09 21:48:29 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 | |
… | |
… | |
1022 | |
1022 | |
1023 | #ifdef AUTOSAVE |
1023 | #ifdef AUTOSAVE |
1024 | /* check for ST_PLAYING state so that we don't try to save off when |
1024 | /* check for ST_PLAYING state so that we don't try to save off when |
1025 | * the player is logging in. |
1025 | * the player is logging in. |
1026 | */ |
1026 | */ |
1027 | if ((pl->last_save_tick + AUTOSAVE) < pticks && pl->state == ST_PLAYING) |
1027 | if ((pl->last_save_tick + AUTOSAVE) < (uint32) pticks && pl->state == ST_PLAYING) |
1028 | { |
1028 | { |
1029 | /* Don't save the player on unholy ground. Instead, increase the |
1029 | /* Don't save the player on unholy ground. Instead, increase the |
1030 | * tick time so it will be about 10 seconds before we try and save |
1030 | * tick time so it will be about 10 seconds before we try and save |
1031 | * again. |
1031 | * again. |
1032 | */ |
1032 | */ |
… | |
… | |
1450 | INVOKE_GLOBAL (CLOCK); |
1450 | INVOKE_GLOBAL (CLOCK); |
1451 | process_events (NULL); /* "do" something with objects with speed */ |
1451 | process_events (NULL); /* "do" something with objects with speed */ |
1452 | flush_sockets (); |
1452 | flush_sockets (); |
1453 | check_active_maps (); /* Removes unused maps after a certain timeout */ |
1453 | check_active_maps (); /* Removes unused maps after a certain timeout */ |
1454 | do_specials (); /* Routines called from time to time. */ |
1454 | do_specials (); /* Routines called from time to time. */ |
|
|
1455 | object::free_mortals (); |
1455 | |
1456 | |
1456 | ++pticks; |
1457 | ++pticks; |
1457 | } |
1458 | } |
1458 | |
1459 | |
1459 | int |
1460 | int |