1 | /* |
1 | /* |
2 | * static char *rcsid_main_c = |
2 | * static char *rcsid_main_c = |
3 | * "$Id: main.C,v 1.9 2006/08/27 15:24:22 root Exp $"; |
3 | * "$Id: main.C,v 1.13 2006/08/29 07:34:00 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 | |
… | |
… | |
717 | * exits, but right now a lot of the code looks at op->contr, |
717 | * exits, but right now a lot of the code looks at op->contr, |
718 | * so thta is an RFE. |
718 | * so thta is an RFE. |
719 | */ |
719 | */ |
720 | if (op->type != PLAYER) return; |
720 | if (op->type != PLAYER) return; |
721 | |
721 | |
722 | /* Need to remove player from transport */ |
|
|
723 | if (op->contr->transport) apply_transport(op, op->contr->transport, AP_UNAPPLY); |
|
|
724 | |
|
|
725 | /* First, lets figure out what map the player is going to go to */ |
722 | /* First, lets figure out what map the player is going to go to */ |
726 | if (exit_ob){ |
723 | if (exit_ob){ |
727 | |
724 | |
728 | /* check to see if we make a template map */ |
725 | /* check to see if we make a template map */ |
729 | if(EXIT_PATH(exit_ob)&&EXIT_PATH(exit_ob)[1]=='@') { |
726 | if(EXIT_PATH(exit_ob)&&EXIT_PATH(exit_ob)[1]=='@') { |
… | |
… | |
1312 | void server_tick () |
1309 | void server_tick () |
1313 | { |
1310 | { |
1314 | nroferrors = 0; |
1311 | nroferrors = 0; |
1315 | |
1312 | |
1316 | doeric_server(); |
1313 | doeric_server(); |
|
|
1314 | INVOKE_GLOBAL (CLOCK); |
1317 | process_events(NULL); /* "do" something with objects with speed */ |
1315 | process_events(NULL); /* "do" something with objects with speed */ |
1318 | cftimer_process_timers();/* Process the crossfire Timers */ |
|
|
1319 | /* Lauwenmark : Here we handle the CLOCK global event */ |
|
|
1320 | execute_global_event(EVENT_CLOCK); |
|
|
1321 | flush_sockets(); |
1316 | flush_sockets(); |
1322 | check_active_maps(); /* Removes unused maps after a certain timeout */ |
1317 | check_active_maps(); /* Removes unused maps after a certain timeout */ |
1323 | do_specials(); /* Routines called from time to time. */ |
1318 | do_specials(); /* Routines called from time to time. */ |
1324 | |
1319 | |
1325 | ++pticks; |
1320 | ++pticks; |
… | |
… | |
1330 | settings.argc = argc; |
1325 | settings.argc = argc; |
1331 | settings.argv = argv; |
1326 | settings.argv = argv; |
1332 | |
1327 | |
1333 | init (argc, argv); |
1328 | init (argc, argv); |
1334 | |
1329 | |
1335 | initPlugins (); /* GROS - Init the Plugins */ |
|
|
1336 | cfperl_init (); |
1330 | cfperl_init (); |
|
|
1331 | initPlugins (); |
1337 | |
1332 | |
1338 | for (;;) |
1333 | for (;;) |
1339 | cfperl_main (); |
1334 | cfperl_main (); |
1340 | |
1335 | |
1341 | // unreached |
1336 | // unreached |