… | |
… | |
2084 | $self->{load_path} = $path; |
2084 | $self->{load_path} = $path; |
2085 | |
2085 | |
2086 | 1 |
2086 | 1 |
2087 | } |
2087 | } |
2088 | |
2088 | |
|
|
2089 | # used to laod the header of an original map |
2089 | sub load_header_orig { |
2090 | sub load_header_orig { |
2090 | my ($self) = @_; |
2091 | my ($self) = @_; |
2091 | |
2092 | |
2092 | $self->load_header_from ($self->load_path) |
2093 | $self->load_header_from ($self->load_path) |
2093 | } |
2094 | } |
2094 | |
2095 | |
|
|
2096 | # used to laod the header of an instantiated map |
2095 | sub load_header_temp { |
2097 | sub load_header_temp { |
2096 | my ($self) = @_; |
2098 | my ($self) = @_; |
2097 | |
2099 | |
2098 | $self->load_header_from ($self->save_path) |
2100 | $self->load_header_from ($self->save_path) |
2099 | } |
2101 | } |
2100 | |
2102 | |
|
|
2103 | # called after loading the header from an instantiated map |
2101 | sub prepare_temp { |
2104 | sub prepare_temp { |
2102 | my ($self) = @_; |
2105 | my ($self) = @_; |
2103 | |
2106 | |
2104 | $self->last_access ((delete $self->{last_access}) |
2107 | $self->last_access ((delete $self->{last_access}) |
2105 | || $cf::RUNTIME); #d# |
2108 | || $cf::RUNTIME); #d# |
2106 | # safety |
2109 | # safety |
2107 | $self->{instantiate_time} = $cf::RUNTIME |
2110 | $self->{instantiate_time} = $cf::RUNTIME |
2108 | if $self->{instantiate_time} > $cf::RUNTIME; |
2111 | if $self->{instantiate_time} > $cf::RUNTIME; |
2109 | } |
2112 | } |
2110 | |
2113 | |
|
|
2114 | # called after loading the header from an original map |
2111 | sub prepare_orig { |
2115 | sub prepare_orig { |
2112 | my ($self) = @_; |
2116 | my ($self) = @_; |
2113 | |
2117 | |
2114 | $self->{load_original} = 1; |
2118 | $self->{load_original} = 1; |
2115 | $self->{instantiate_time} = $cf::RUNTIME; |
2119 | $self->{instantiate_time} = $cf::RUNTIME; |
… | |
… | |
2212 | } |
2216 | } |
2213 | } |
2217 | } |
2214 | } |
2218 | } |
2215 | |
2219 | |
2216 | $f->resolve_delayed_derefs; |
2220 | $f->resolve_delayed_derefs; |
|
|
2221 | } else { |
|
|
2222 | $self->post_load_original |
|
|
2223 | if delete $self->{load_original}; |
2217 | } |
2224 | } |
2218 | |
2225 | |
2219 | cf::cede_to_tick; |
2226 | cf::cede_to_tick; |
2220 | # now do the right thing for maps |
2227 | # now do the right thing for maps |
2221 | $self->link_multipart_objects; |
2228 | $self->link_multipart_objects; |