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.55 by root, Tue Aug 29 17:32:19 2006 UTC vs.
Revision 1.58 by root, Wed Aug 30 12:08:15 2006 UTC

764 defined $path or return; 764 defined $path or return;
765 765
766 unlink "$path.pst"; 766 unlink "$path.pst";
767}; 767};
768 768
769# old style persistent data, TODO: remove #d#
770*cf::mapsupport::on_swapin =
771*cf::mapsupport::on_load = sub {
772 my ($map) = @_;
773
774 my $path = $map->tmpname;
775 $path = $map->path unless defined $path;
776
777 open my $fh, "<:raw", "$path.cfperl"
778 or return; # no perl data
779
780 my $data = Storable::thaw do { local $/; <$fh> };
781
782 $data->{version} <= 1
783 or return; # too new
784
785 $map->_set_obs ($data->{obs});
786 $map->invoke (EVENT_MAP_UPGRADE);
787};
788
789attach_to_maps prio => -10000, package => cf::mapsupport::; 769attach_to_maps prio => -10000, package => cf::mapsupport::;
790 770
791############################################################################# 771#############################################################################
792# load/save perl data associated with player->ob objects 772# load/save perl data associated with player->ob objects
793 773

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines