ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/main.C
(Generate patch)

Comparing deliantra/server/server/main.C (file contents):
Revision 1.88 by root, Wed Jan 24 16:36:10 2007 UTC vs.
Revision 1.92 by root, Tue Mar 6 03:06:00 2007 UTC

250 pl->refcnt_chk (); 250 pl->refcnt_chk ();
251 251
252 if (!pl->ob || !pl->ns || !pl->ob->active) 252 if (!pl->ob || !pl->ns || !pl->ob->active)
253 continue; 253 continue;
254 254
255 if (pl->ob->speed_left > 0) 255 if (pl->ob->speed_left > 0 && pl->ns)
256 if (handle_newcs_player (pl->ob)) 256 if (handle_newcs_player (pl->ob))
257 flag = 1; 257 flag = 1;
258 258
259 /* If the player is not actively playing, don't make a 259 /* If the player is not actively playing, don't make a
260 * backup save - nothing to save anyway. Plus, the 260 * backup save - nothing to save anyway. Plus, the
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
492int 491int
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 ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines