X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=network.h;h=b643a1b7da9f96641972d352417c3569d3ba2577;hb=874c9d7e6ee2d826f9eb34518e8163283439c38e;hp=ef6876a79b843c2e2de39ef634331cb075816895;hpb=509214f72c8974bb30091799752412419dd59632;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/network.h b/network.h index ef6876a..b643a1b 100644 --- a/network.h +++ b/network.h @@ -8,6 +8,7 @@ #include "vg/vg_stdint.h" #include "steam.h" +#include "network_common.h" #include "network_msg.h" #include "highscores.h" #include "addon_types.h" @@ -17,7 +18,6 @@ /* * Interface */ -//#define SR_USE_LOCALHOST /* Call it at start; Connects us to the gameserver */ static void network_init(void); @@ -46,6 +46,7 @@ struct { HSteamNetConnection remote; ESteamNetworkingConnectionState state; + u32 remote_version; f64 last_attempt, last_frame; u32 retries; @@ -76,8 +77,10 @@ static void network_request_scoreboard( const char *mod_uid, u32 week, u64 userdata ); static void network_publish_laptime( const char *mod_uid, const char *route_uid, f64 lap_time ); +static void chat_send_message( const char *message ); static int network_connected(void){ + if( network_client.remote_version != NETWORK_SKATERIFT_VERSION ) return 0; return network_client.state == k_ESteamNetworkingConnectionState_Connected; }