… | |
… | |
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++... |
1155 | sub change_all_map_light { |
1155 | sub 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 | |
1161 | sub try_load_header($) { |
1162 | sub 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 = find_map $path; |
1224 | } |
1226 | } |
1225 | |
1227 | |
1226 | $cf::MAP{$key} = $map |
1228 | $cf::MAP{$key} = $map |
1227 | } |
1229 | } |