--- deliantra/server/lib/cf.pm 2007/01/11 01:01:56 1.163 +++ deliantra/server/lib/cf.pm 2007/01/11 01:24:25 1.164 @@ -518,6 +518,14 @@ &cf::map::load_map_header ($self->save_path) } +sub unlink_save { + my ($self) = @_; + + utf8::encode (my $save = $self->save_path); + IO::AIO::aioreq_pri 4; IO::AIO::aio_unlink $save; + IO::AIO::aioreq_pri 4; IO::AIO::aio_unlink "$save.pst"; +} + package cf; ############################################################################# @@ -1403,8 +1411,8 @@ $self->{deny_save} = 1; $self->{deny_reset} = 1; } else { - $self->fix_auto_apply; $self->decay_objects; + $self->fix_auto_apply; $self->update_buttons; $self->set_darkness_map; $self->difficulty ($self->estimate_difficulty) @@ -1550,18 +1558,10 @@ $self->reset_at <= $cf::RUNTIME } -sub unlink_save { - my ($self) = @_; - - utf8::encode (my $save = $self->{path}->save_path); - aioreq_pri 3; IO::AIO::aio_unlink $save; - aioreq_pri 3; IO::AIO::aio_unlink "$save.pst"; -} - sub rename { my ($self, $new_path) = @_; - $self->unlink_save; + $self->{path}->unlink_save; delete $cf::MAP{$self->path}; $self->{path} = new cf::path $new_path; @@ -1585,7 +1585,7 @@ $_->clear_links_to ($self) for values %cf::MAP; - $self->unlink_save; + $self->{path}->unlink_save; $self->destroy; }