#include "world_sfd.h"
#include "world_routes.h"
#include "vg/vg_imgui.h"
+#include "gui.h"
+#include "ent_region.h"
static void scores_update(void);
k_nSteamNetworkingSend_Reliable, NULL );
}
+static void network_send_region(void){
+ if( !network_connected() )
+ return;
+
+ netmsg_region *region = alloca( sizeof(netmsg_region) + NETWORK_REGION_MAX );
+
+ region->inetmsg_id = k_inetmsg_region;
+ region->client = 0;
+ region->flags = global_ent_region.flags;
+
+ u32 l = vg_strncpy( global_ent_region.location, region->loc,
+ NETWORK_REGION_MAX, k_strncpy_always_add_null );
+
+ SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
+ hSteamNetworkingSockets, network_client.remote,
+ region, sizeof(netmsg_region)+l+1,
+ k_nSteamNetworkingSend_Reliable, NULL );
+}
+
static void network_send_request( netmsg_request *req, vg_msg *body,
void (*callback)(
netmsg_request *res, vg_msg *body,
}
static void network_status_string( vg_str *str, u32 *colour ){
+ if( skaterift.demo_mode ){
+ vg_strcat( str, "Offline" );
+ return;
+ }
+
if( steam_ready ){
if( network_client.user_intent == k_server_intent_offline ){
vg_strcat( str, "Offline" );
for( u32 i=0; i<k_netmsg_playeritem_max; i ++ ){
network_send_item(i);
}
+ network_send_region();
}
static void poll_remote_connection(void){