… | |
… | |
237 | * is needed after the players have been updated. |
237 | * is needed after the players have been updated. |
238 | */ |
238 | */ |
239 | static void |
239 | static void |
240 | process_players1 () |
240 | process_players1 () |
241 | { |
241 | { |
242 | int flag; |
|
|
243 | |
|
|
244 | /* Basically, we keep looping until all the players have done their actions. */ |
242 | /* Basically, we keep looping until all the players have done their actions. */ |
245 | for (flag = 1; flag != 0;) |
243 | for (int flag = 1; flag != 0;) |
246 | { |
244 | { |
247 | flag = 0; |
245 | flag = 0; |
248 | for_all_players (pl) |
246 | for_all_players (pl) |
249 | { |
247 | { |
250 | pl->refcnt_chk (); |
248 | pl->refcnt_chk (); |
… | |
… | |
549 | * done on the same tick, but that will happen very infrequently |
547 | * done on the same tick, but that will happen very infrequently |
550 | * |
548 | * |
551 | * I also think this code makes it easier to see how often we really are |
549 | * I also think this code makes it easier to see how often we really are |
552 | * doing the various things. |
550 | * doing the various things. |
553 | */ |
551 | */ |
554 | |
|
|
555 | extern unsigned long todtick; |
|
|
556 | |
|
|
557 | void |
552 | void |
558 | do_specials (void) |
553 | do_specials (void) |
559 | { |
554 | { |
560 | if (!(pticks % PTICKS_PER_CLOCK)) |
555 | if (!(pticks % TICKS_PER_HOUR)) |
561 | tick_the_clock (); |
556 | adjust_daylight (); |
562 | |
557 | |
563 | if (!(pticks % 7)) |
558 | if (!(pticks % 7)) |
564 | shstr::gc (); |
559 | shstr::gc (); |
565 | |
560 | |
566 | if (!(pticks % 2503)) |
561 | if (!(pticks % 2503)) |
… | |
… | |
649 | { |
644 | { |
650 | settings.argc = argc; |
645 | settings.argc = argc; |
651 | settings.argv = argv; |
646 | settings.argv = argv; |
652 | |
647 | |
653 | init (argc, argv); |
648 | init (argc, argv); |
654 | init_environ (); |
|
|
655 | |
649 | |
656 | initPlugins (); |
650 | initPlugins (); |
657 | |
651 | |
658 | for (;;) |
652 | for (;;) |
659 | cfperl_main (); |
653 | cfperl_main (); |