connection semantics
[carveJwlIkooP6JGAAIwe30JlM.git] / world_sfd.c
index 478f431ee7aa01956d27746184d39d1ef506454c..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;