… | |
… | |
31 | |
31 | |
32 | my $pl_ref = $pl->refcnt_cnt; |
32 | my $pl_ref = $pl->refcnt_cnt; |
33 | my $ob_ref = $ob->refcnt_cnt; |
33 | my $ob_ref = $ob->refcnt_cnt; |
34 | |
34 | |
35 | ## pl_ref == (P)$pl + (P)%cf::PLAYER + (C)ob->contr |
35 | ## pl_ref == (P)$pl + (P)%cf::PLAYER + (C)ob->contr |
36 | ## ob_ref == (P)$ob + (C)pl->observe + (C)simply being an object |
36 | ## ob_ref == (P)$ob + (C)pl->observe + (C)pl->viewpoint + (C)simply being an object |
|
|
37 | ## !$pl->ns ensures that ob == viewpoint == observe |
37 | if ($pl_ref == 3 && $ob_ref == 3) { |
38 | if ($pl_ref == 3 && $ob_ref == 4) { |
38 | warn "player-scheduler destroy ", $ob->name;#d# |
39 | warn "player-scheduler destroy ", $ob->name;#d# |
39 | |
40 | |
40 | # remove from sight and get fresh "copies" |
41 | # remove from sight and get fresh "copies" |
41 | $pl = delete $cf::PLAYER{$ob->name}; |
42 | $pl = delete $cf::PLAYER{$ob->name}; |
42 | $ob = $pl->ob; |
43 | $ob = $pl->ob; |