ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfperl/cfperl.xs
(Generate patch)

Comparing deliantra/server/plugins/cfperl/cfperl.xs (file contents):
Revision 1.56 by root, Tue Jul 11 14:24:16 2006 UTC vs.
Revision 1.57 by root, Tue Jul 11 15:25:00 2006 UTC

492 rv = 0; 492 rv = 0;
493 } 493 }
494 else if (event_code == EVENT_CLOCK) 494 else if (event_code == EVENT_CLOCK)
495 { 495 {
496 dSP; 496 dSP;
497 int i, count;
497 498
498 clean_obj_cache (); 499 clean_obj_cache ();
499 500
500 ENTER; 501 ENTER;
501 SAVETMPS; 502 SAVETMPS;
503
504 // service up to 8 events per tick better would be
505 // to check for elapsed time and stop processing after
506 // 0.25 * server_tick or so
507 for (i = 9; --i; )
508 {
502 PUSHMARK (SP); 509 PUSHMARK (SP);
503 XPUSHs (sv_2mortal (newSViv (0))); 510 XPUSHs (sv_2mortal (newSViv (0)));
504 PUTBACK; 511 PUTBACK;
505 call_pv ("Event::one_event", G_DISCARD | G_EVAL); 512 count = call_pv ("Event::one_event", G_SCALAR | G_EVAL);
506 SPAGAIN; 513 SPAGAIN;
514
515 if (!count || !POPi)
516 break;
517 }
518
507 FREETMPS; 519 FREETMPS;
508 LEAVE; 520 LEAVE;
509 } 521 }
510 else 522 else
511 { 523 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines