--- deliantra/server/ext/map-scheduler.ext 2007/02/17 01:58:55 1.31 +++ deliantra/server/ext/map-scheduler.ext 2007/04/16 06:23:41 1.32 @@ -23,9 +23,7 @@ utf8::decode $map; next if $map =~ /\.(?:pst|meta)$/; cf::map::find $map; - $cf::WAIT_FOR_TICK->wait; - $cf::WAIT_FOR_TICK->wait; - $cf::WAIT_FOR_TICK->wait; + cf::wait_for_tick; } #TODO: should also preload random maps... @@ -58,10 +56,10 @@ my $max_idle = cf::object::actives_size > $MAX_ACTIVES ? 1 : $SWAP_TIMEOUT; if ($map->last_access + $max_idle <= $cf::RUNTIME && !$map->players) { $map->swap_out; - $cf::WAIT_FOR_TICK_ONE->wait unless $max_idle == 1; + cf::wait_for_tick unless $max_idle == 1; } elsif ($map->{last_save} + $SAVE_TIMEOUT <= $cf::RUNTIME) { $map->save; - $cf::WAIT_FOR_TICK_ONE->wait unless $max_idle == 1; + cf::wait_for_tick unless $max_idle == 1; } } };