ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.170 by root, Sun Jan 14 02:00:37 2007 UTC vs.
Revision 1.173 by root, Sun Jan 14 18:00:34 2007 UTC

1113 1113
1114use Fcntl; 1114use Fcntl;
1115use Coro::AIO; 1115use Coro::AIO;
1116 1116
1117use overload 1117use overload
1118 '""' => \&as_string; 1118 '""' => \&as_string,
1119 fallback => 1;
1119 1120
1120our $MAX_RESET = 3600; 1121our $MAX_RESET = 3600;
1121our $DEFAULT_RESET = 3000; 1122our $DEFAULT_RESET = 3000;
1122 1123
1123sub generate_random_map { 1124sub generate_random_map {
1151 1152
1152# also paths starting with '/' 1153# also paths starting with '/'
1153$EXT_MAP{"cf::map"} = qr{^(?=/)}; 1154$EXT_MAP{"cf::map"} = qr{^(?=/)};
1154 1155
1155sub thawer_merge { 1156sub thawer_merge {
1157 my ($self, $merge) = @_;
1158
1156 # we have to keep some variables in memory intact 1159 # we have to keep some variables in memory intact
1157 local $_[0]{path}; 1160 local $self->{path};
1161 local $self->{load_path};
1158 local $_[0]{deny_save}; 1162 local $self->{deny_save};
1159 local $_[0]{deny_reset}; 1163 local $self->{deny_reset};
1160 1164
1161 $_[0]->SUPER::thawer_merge ($_[1]); 1165 $self->SUPER::thawer_merge ($merge);
1162} 1166}
1163 1167
1164sub normalise { 1168sub normalise {
1165 my ($path, $base) = @_; 1169 my ($path, $base) = @_;
1166 1170
1336 1340
1337 $map->load_header 1341 $map->load_header
1338 or return; 1342 or return;
1339 1343
1340 if ($map->should_reset) { 1344 if ($map->should_reset) {
1345 $cf::WAIT_FOR_TICK->wait;
1341 $map->reset; 1346 $map->reset;
1342 undef $guard; 1347 undef $guard;
1343 $map = find $path 1348 $map = find $path
1344 or return; 1349 or return;
1345 } 1350 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines