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.121 by root, Tue Jan 2 11:11:52 2007 UTC vs.
Revision 1.124 by root, Tue Jan 2 22:55:05 2007 UTC

1153# and all this just because we cannot iterate over 1153# and all this just because we cannot iterate over
1154# all maps in C++... 1154# all maps in C++...
1155sub change_all_map_light { 1155sub change_all_map_light {
1156 my ($change) = @_; 1156 my ($change) = @_;
1157 1157
1158 $_->change_map_light ($change) for values %cf::MAP; 1158 $_->change_map_light ($change)
1159 for grep $_->outdoor, values %cf::MAP;
1159} 1160}
1160 1161
1161sub try_load_header($) { 1162sub try_load_header($) {
1162 my ($path) = @_; 1163 my ($path) = @_;
1163 1164
1218 $map->{last_save} = $cf::RUNTIME; 1219 $map->{last_save} = $cf::RUNTIME;
1219 $map->last_access ($cf::RUNTIME); 1220 $map->last_access ($cf::RUNTIME);
1220 1221
1221 if ($map->should_reset) { 1222 if ($map->should_reset) {
1222 $map->reset; 1223 $map->reset;
1224 undef $guard;
1223 $map = find_map $path; 1225 $map = cf::map::find_map ($path)
1226 or return;
1224 } 1227 }
1225 1228
1226 $cf::MAP{$key} = $map 1229 $cf::MAP{$key} = $map
1227 } 1230 }
1228} 1231}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines