… | |
… | |
2448 | |
2448 | |
2449 | =item $player_object->enter_link |
2449 | =item $player_object->enter_link |
2450 | |
2450 | |
2451 | Freezes the player and moves him/her to a special map (C<{link}>). |
2451 | Freezes the player and moves him/her to a special map (C<{link}>). |
2452 | |
2452 | |
2453 | The player should be reasonably safe there for short amounts of time. You |
2453 | The player should be reasonably safe there for short amounts of time (e.g. |
2454 | I<MUST> call C<leave_link> as soon as possible, though. |
2454 | for loading a map). You I<MUST> call C<leave_link> as soon as possible, |
|
|
2455 | though, as the palyer cannot control the character while it is on the link |
|
|
2456 | map. |
2455 | |
2457 | |
2456 | Will never block. |
2458 | Will never block. |
2457 | |
2459 | |
2458 | =item $player_object->leave_link ($map, $x, $y) |
2460 | =item $player_object->leave_link ($map, $x, $y) |
2459 | |
2461 | |
… | |
… | |
2517 | |
2519 | |
2518 | $map->load; |
2520 | $map->load; |
2519 | $map->load_neighbours; |
2521 | $map->load_neighbours; |
2520 | |
2522 | |
2521 | return unless $self->contr->active; |
2523 | return unless $self->contr->active; |
|
|
2524 | $self->flag (cf::FLAG_DEBUG, 0);#d# temp |
2522 | $self->activate_recursive; |
2525 | $self->activate_recursive; |
2523 | |
2526 | |
2524 | local $self->{_prev_pos} = $link_pos; # ugly hack for rent.ext |
2527 | local $self->{_prev_pos} = $link_pos; # ugly hack for rent.ext |
2525 | $self->enter_map ($map, $x, $y); |
2528 | $self->enter_map ($map, $x, $y); |
2526 | } |
2529 | } |
… | |
… | |
3832 | $msg =~ s/\n//; |
3835 | $msg =~ s/\n//; |
3833 | |
3836 | |
3834 | # limit the # of concurrent backtraces |
3837 | # limit the # of concurrent backtraces |
3835 | if ($_log_backtrace < 2) { |
3838 | if ($_log_backtrace < 2) { |
3836 | ++$_log_backtrace; |
3839 | ++$_log_backtrace; |
|
|
3840 | my $perl_bt = Carp::longmess $msg; |
3837 | async { |
3841 | async { |
3838 | $Coro::current->{desc} = "abt $msg"; |
3842 | $Coro::current->{desc} = "abt $msg"; |
3839 | |
3843 | |
3840 | my @bt = fork_call { |
3844 | my @bt = fork_call { |
3841 | @addr = map { sprintf "%x", $_ } @addr; |
3845 | @addr = map { sprintf "%x", $_ } @addr; |
… | |
… | |
3852 | } |
3856 | } |
3853 | |
3857 | |
3854 | @funcs |
3858 | @funcs |
3855 | }; |
3859 | }; |
3856 | |
3860 | |
3857 | LOG llevInfo, "[ABT] $msg\n"; |
3861 | LOG llevInfo, "[ABT] $perl_bt\n"; |
|
|
3862 | LOG llevInfo, "[ABT] --- C backtrace follows ---\n"; |
3858 | LOG llevInfo, "[ABT] $_\n" for @bt; |
3863 | LOG llevInfo, "[ABT] $_\n" for @bt; |
3859 | --$_log_backtrace; |
3864 | --$_log_backtrace; |
3860 | }; |
3865 | }; |
3861 | } else { |
3866 | } else { |
3862 | LOG llevInfo, "[ABT] $msg\n"; |
3867 | LOG llevInfo, "[ABT] $msg\n"; |