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

Comparing deliantra/server/ext/map-link.ext (file contents):
Revision 1.8 by root, Sat Dec 13 20:34:37 2008 UTC vs.
Revision 1.9 by root, Sat Mar 20 02:24:38 2010 UTC

1#! perl # mandatory 1#! perl # mandatory
2
3# this is the map type for the {link} map, a singleton
4# this is the only map in the server that is guaranteed to exit
5# at all times without blocking, and this is ensured by not relying
6# on any external files.
2 7
3cf::map->register (qr{^\{link\}}); 8cf::map->register (qr{^\{link\}});
4 9
5sub load_header { 10sub load_header {
6 my ($self) = @_; 11 my ($self) = @_;
17 22
18 # provide some exits "home" 23 # provide some exits "home"
19 my $exit = cf::object::new "exit"; 24 my $exit = cf::object::new "exit";
20 Guard::scope_guard { $exit->destroy }; 25 Guard::scope_guard { $exit->destroy };
21 26
27 # these teleporters exist in case a player gets stuck
22 $exit->slaying ($cf::EMERGENCY_POSITION->[0]); 28 $exit->slaying ($cf::EMERGENCY_POSITION->[0]);
23 $exit->stats->hp ($cf::EMERGENCY_POSITION->[1]); 29 $exit->stats->hp ($cf::EMERGENCY_POSITION->[1]);
24 $exit->stats->sp ($cf::EMERGENCY_POSITION->[2]); 30 $exit->stats->sp ($cf::EMERGENCY_POSITION->[2]);
25 31
26 $self->insert ($exit->clone, 9, 9); 32 $self->insert ($exit->clone, 9, 9);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines