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

Comparing deliantra/server/ext/map-world.ext (file contents):
Revision 1.42 by root, Fri Apr 22 06:19:07 2011 UTC vs.
Revision 1.43 by root, Sat Apr 23 04:46:26 2011 UTC

1#! perl # optional 1#! perl # mandatory
2 2
3# manages the worldmap by directing to other handlers 3# manages the worldmap by directing to other handlers
4 4
5cf::map->register (qr{^/world/world_(-?\d+)_(-?\d+)(?:_(-?\d+))?$}, 100); 5cf::map->register (qr{^/world/world_(-?\d+)_(-?\d+)(?:_(-?\d+))?$}, 100);
6 6
118 } else { 118 } else {
119 $self->add_underlay ("\x00" x ($TILE_W * $TILE_H), 0, $TILE_W, ["deep_sea"]); 119 $self->add_underlay ("\x00" x ($TILE_W * $TILE_H), 0, $TILE_W, ["deep_sea"]);
120 } 120 }
121} 121}
122 122
123sub load { 123#sub load {
124 my ($self) = @_; 124# my ($self) = @_;
125 125#
126 if ($self->{load_path}) { 126# if ($self->{load_path}) {
127# warn "load $self\n";#d#
127 $self->SUPER::load; 128# $self->SUPER::load;
128 } else { 129# } else {
130# warn "fill $self\n";#d#
131# my $guard = cf::lock_acquire "map_data:$self->{path}";
132#
129 $self->alloc; 133# $self->alloc;
130 $self->fill; 134# $self->fill;
131 $self->in_memory (cf::MAP_ACTIVE); 135# $self->in_memory (cf::MAP_ACTIVE);
132 $self->activate; 136# $self->activate;
137# $self->post_load;
133 } 138# }
134} 139#}
135 140
136# MUST be overwritten to call at least ->fill 141# MUST be overwritten to call at least ->fill
137sub post_load { 142sub post_load {
138 my ($self) = @_; 143 my ($self) = @_;
139 144

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines