… | |
… | |
370 | /* Animate the object. Bug or feature that anim_speed |
370 | /* Animate the object. Bug or feature that anim_speed |
371 | * is based on ticks, and not the creatures speed? |
371 | * is based on ticks, and not the creatures speed? |
372 | */ |
372 | */ |
373 | if (op->anim_speed && op->last_anim >= op->anim_speed) |
373 | if (op->anim_speed && op->last_anim >= op->anim_speed) |
374 | { |
374 | { |
375 | if ((op->type == PLAYER)) |
375 | animate_object (op, op->type == PLAYER ? op->facing : op->direction); |
376 | animate_object (op, op->facing); |
|
|
377 | else |
|
|
378 | animate_object (op, op->direction); |
|
|
379 | |
376 | |
380 | op->last_anim = 1; |
377 | op->last_anim = 1; |
381 | } |
378 | } |
382 | else |
379 | else |
383 | op->last_anim++; |
380 | op->last_anim++; |
… | |
… | |
476 | LOG (llevDebug, "cleanup done.\n"); |
473 | LOG (llevDebug, "cleanup done.\n"); |
477 | |
474 | |
478 | if (make_core) |
475 | if (make_core) |
479 | { |
476 | { |
480 | cleanup_inform (cause, make_core); |
477 | cleanup_inform (cause, make_core); |
|
|
478 | cfperl_cleanup (make_core); |
481 | _exit (1); |
479 | _exit (1); |
482 | } |
480 | } |
483 | else |
481 | else |
484 | { |
482 | { |
485 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting.\n"); |
483 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting.\n"); |
486 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE "\n"); |
484 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE "\n"); |
487 | flush_sockets (); |
485 | flush_sockets (); |
|
|
486 | cfperl_cleanup (make_core); |
488 | _exit (0); |
487 | _exit (0); |
489 | } |
488 | } |
490 | } |
489 | } |
491 | |
490 | |
492 | int |
491 | int |
… | |
… | |
650 | { |
649 | { |
651 | settings.argc = argc; |
650 | settings.argc = argc; |
652 | settings.argv = argv; |
651 | settings.argv = argv; |
653 | |
652 | |
654 | init (argc, argv); |
653 | init (argc, argv); |
|
|
654 | init_environ (); |
655 | |
655 | |
656 | initPlugins (); |
656 | initPlugins (); |
657 | |
657 | |
658 | for (;;) |
658 | for (;;) |
659 | cfperl_main (); |
659 | cfperl_main (); |