… | |
… | |
476 | $pl->chargen_race_next; |
476 | $pl->chargen_race_next; |
477 | } |
477 | } |
478 | |
478 | |
479 | $pl->chargen_race_done; |
479 | $pl->chargen_race_done; |
480 | |
480 | |
|
|
481 | while () { |
|
|
482 | my $res = query $ns, cf::CS_QUERY_SINGLECHAR, |
|
|
483 | "Now choose a gender.\nPress 'f' to become female, and 'm' to become male.\n"; |
|
|
484 | |
|
|
485 | if ($res =~ /^[fF]/) { |
|
|
486 | $pl->gender (1); |
|
|
487 | last; |
|
|
488 | } elsif ($res =~ /^[mM]/) { |
|
|
489 | $pl->gender (0); |
|
|
490 | last; |
|
|
491 | } |
|
|
492 | } |
|
|
493 | |
|
|
494 | $ob->reply (undef, "Welcome to Crossfire!"); |
|
|
495 | |
481 | delete $pl->{deny_save}; |
496 | delete $pl->{deny_save}; |
482 | |
497 | |
483 | last; |
498 | last; |
484 | } |
499 | } |
485 | }); |
500 | }); |
… | |
… | |
608 | |
623 | |
609 | # remove from sight and get fresh "copies" |
624 | # remove from sight and get fresh "copies" |
610 | $pl = delete $cf::PLAYER{$ob->name}; |
625 | $pl = delete $cf::PLAYER{$ob->name}; |
611 | $ob = $pl->ob; |
626 | $ob = $pl->ob; |
612 | |
627 | |
613 | $ob->destroy; |
|
|
614 | $pl->destroy; |
628 | $pl->destroy; # destroys $ob |
615 | } else { |
629 | } else { |
616 | my $a_ = $pl->refcnt;#d# |
630 | my $a_ = $pl->refcnt;#d# |
617 | my $b_ = $ob->refcnt;#d# |
631 | my $b_ = $ob->refcnt;#d# |
618 | |
632 | |
619 | warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref ob $ob_ref (C pl $a_ ob $b_)\n";#d# |
633 | warn "player-scheduler refcnt ", $ob->name, " pl $pl_ref ob $ob_ref (C pl $a_ ob $b_)\n";#d# |