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

Comparing deliantra/server/ext/login.ext (file contents):
Revision 1.13 by root, Sun Jan 7 23:10:42 2007 UTC vs.
Revision 1.16 by root, Mon Jan 8 12:39:16 2007 UTC

292 on_apply => sub { 292 on_apply => sub {
293 my ($bed, $ob) = @_; 293 my ($bed, $ob) = @_;
294 294
295 return cf::override 0 unless $ob->type == cf::PLAYER; 295 return cf::override 0 unless $ob->type == cf::PLAYER;
296 296
297 my $pl = $ob->pl; 297 my $pl = $ob->contr;
298 298
299 # update respawn position 299 # update respawn position
300 $pl->savebed ($bed->map->path, $bed->x, $bed->y); 300 $pl->savebed ($bed->map->path, $bed->x, $bed->y);
301 301
302 $pl->killer ("left"); 302 $pl->killer ("left");
329 329
330 if ($cleanly) { 330 if ($cleanly) {
331 $_->ob->message ("$name left the game.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list; 331 $_->ob->message ("$name left the game.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list;
332 } else { 332 } else {
333 $_->ob->message ("$name uncerimoniously disconnected.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list; 333 $_->ob->message ("$name uncerimoniously disconnected.", cf::NDI_DK_ORANGE | cf::NDI_UNIQUE) for cf::player::list;
334 delete $pl->{clean_save};
334 } 335 }
335 }, 336 },
336); 337);
337 338
338cf::client->attach ( 339cf::client->attach (
363 eval { 364 eval {
364 if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) { 365 if ($pl->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) {
365 $pl->save; 366 $pl->save;
366 Coro::Timer::sleep $SAVE_INTERVAL; 367 Coro::Timer::sleep $SAVE_INTERVAL;
367 } 368 }
369 my $ob = $pl->ob;
370 Scalar::Util::weaken $pl; # 2 == from object + from perl
371 Scalar::Util::weaken $ob; # 2 == one from being an object + ???
372 my $a_ = $pl->refcnt;
373 my $b_ = $ob->refcnt;
374 my $a = $pl->refcnt_cnt;
375 my $b = $ob->refcnt_cnt;
376 warn "rc $a,$a_ $b,$b_\n";#d#
368 }; 377 };
369 warn $@ if $@; 378 warn $@ if $@;
370 Coro::cede; 379 Coro::cede;
371 }; 380 };
372 } 381 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines