connection semantics
[carveJwlIkooP6JGAAIwe30JlM.git] / world_sfd.c
index ca6f774b327fe4cd41ae3002b2a1cf8ea049a8d0..bf41bf26b172edb46676455be7668d7b3cf23d6e 100644 (file)
@@ -70,7 +70,7 @@ static void world_sfd_compile_scores( struct leaderboard_cache *board ){
       return;
    }
 
-   if( !network_client.remote ){
+   if( !network_connected() ){
       sfd_encode( 4, "Offline" );
       return;
    }
@@ -150,7 +150,7 @@ static void world_sfd_update( world_instance *world, v3f pos ){
       struct leaderboard_cache *board = &world->leaderboard_cache[ closest ];
 
       /* request new board if cache expires */
-      if( network_client.remote ){
+      if( network_connected() ){
          f64 delta = vg.time_real - board->cache_time;
          if( (delta > 45.0) || (board->cache_time == 0.0) ){
             board->cache_time = vg.time_real;
@@ -180,7 +180,7 @@ static void world_sfd_update( world_instance *world, v3f pos ){
       float *target = &world_sfd.buffer[i*2+0],
             *cur =    &world_sfd.buffer[i*2+1];
       
-      float const rate = vg.time_delta * 15.2313131414f;
+      float const rate = vg.time_delta * 25.2313131414f;
       float d1 = *target-*cur;
       
       if( fabsf(d1) > rate ){