… | |
… | |
379 | my $pl_ref = $pl->refcnt_cnt; |
379 | my $pl_ref = $pl->refcnt_cnt; |
380 | my $ob_ref = $ob->refcnt_cnt; |
380 | my $ob_ref = $ob->refcnt_cnt; |
381 | |
381 | |
382 | ## pl_ref == one from object + one from cf::PLAYER |
382 | ## pl_ref == one from object + one from cf::PLAYER |
383 | ## ob_ref == one from simply being an object |
383 | ## ob_ref == one from simply being an object |
|
|
384 | #TODO: the above should be correct, understand the 1/0, respectively |
384 | if ($pl_ref == 2 && $ob_ref == 1) { |
385 | if ($pl_ref == 1 && $ob_ref == 0) { |
385 | warn "player-scheduler destroy ", $ob->name;#d# |
386 | warn "player-scheduler destroy ", $ob->name;#d# |
386 | |
387 | |
387 | # remove from sight and get fresh "copies" |
388 | # remove from sight and get fresh "copies" |
388 | $pl = delete $cf::PLAYER{$ob->name}; |
389 | $pl = delete $cf::PLAYER{$ob->name}; |
389 | $ob = $pl->ob; |
390 | $ob = $pl->ob; |