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.208 by root, Mon Feb 12 00:27:20 2007 UTC vs.
Revision 1.210 by root, Mon Feb 12 01:32:49 2007 UTC

1609 return if $self->players; 1609 return if $self->players;
1610 return if $self->isa ("ext::map_per_player");#d# 1610 return if $self->isa ("ext::map_per_player");#d#
1611 1611
1612 warn "resetting map ", $self->path;#d# 1612 warn "resetting map ", $self->path;#d#
1613 1613
1614 $self->in_memory (cf::MAP_SWAPPED);
1615
1616 # need to save uniques path
1617 unless ($self->{deny_save}) {
1618 my $uniq = $self->uniq_path; utf8::encode $uniq;
1619
1620 $self->_save_objects ($uniq, cf::IO_UNIQUES)
1621 if $uniq;
1622 }
1623
1614 delete $cf::MAP{$self->path}; 1624 delete $cf::MAP{$self->path};
1615 1625
1616 $self->in_memory (cf::MAP_SWAPPED);
1617 $self->clear; 1626 $self->clear;
1618 1627
1619 $_->clear_links_to ($self) for values %cf::MAP; 1628 $_->clear_links_to ($self) for values %cf::MAP;
1620 1629
1621 $self->unlink_save; 1630 $self->unlink_save;
2197 2206
2198=cut 2207=cut
2199 2208
2200our $DB; 2209our $DB;
2201 2210
2202sub db_load() { 2211sub db_init {
2203 unless ($DB) { 2212 unless ($DB) {
2204 $DB = BDB::db_create $DB_ENV; 2213 $DB = BDB::db_create $DB_ENV;
2205 2214
2206 cf::sync_job { 2215 cf::sync_job {
2207 eval { 2216 eval {
2287 Event::one_event; 2296 Event::one_event;
2288 })->prio (Coro::PRIO_MAX); 2297 })->prio (Coro::PRIO_MAX);
2289 }; 2298 };
2290 2299
2291 cfg_load; 2300 cfg_load;
2292 db_load; 2301 db_init;
2293 load_extensions; 2302 load_extensions;
2294 2303
2295 $TICK_WATCHER->start; 2304 $TICK_WATCHER->start;
2296 Event::loop; 2305 Event::loop;
2297} 2306}
2440 require cf; 2449 require cf;
2441 cf::_connect_to_perl; # nominally unnecessary, but cannot hurt 2450 cf::_connect_to_perl; # nominally unnecessary, but cannot hurt
2442 2451
2443 warn "loading config and database again"; 2452 warn "loading config and database again";
2444 cf::cfg_load; 2453 cf::cfg_load;
2445 cf::db_load;
2446 2454
2447 warn "loading extensions"; 2455 warn "loading extensions";
2448 cf::load_extensions; 2456 cf::load_extensions;
2449 2457
2450 warn "reattaching attachments to objects/players"; 2458 warn "reattaching attachments to objects/players";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines