*/
vg_info( "Requesting new authorization ticket\n" );
- steam_async *call = steam_new_async();
- call->data = NULL;
+
+ vg_steam_async_call *call = vg_alloc_async_steam_api_call();
+ call->userdata = NULL;
call->p_handler = on_auth_ticket_recieved;
- call->id = SteamAPI_ISteamUser_RequestEncryptedAppTicket( hSteamUser,
- NULL, 0 );
+ call->id =
+ SteamAPI_ISteamUser_RequestEncryptedAppTicket( hSteamUser, NULL, 0 );
}
VG_STATIC void send_auth_ticket(void)
setscore->inetmsg_id = k_inetmsg_set_score;
int count = 0;
- for( u32 i=0; i<vg_list_size(track_infos); i++ )
- {
- if( track_infos[i].push )
- {
+ for( u32 i=0; i<vg_list_size(track_infos); i++ ){
+ if( track_infos[i].push ){
track_infos[i].push = 0;
highscore_record *user_record = highscore_find_user_record( 0, i );
- if( !user_record )
- {
+ if( !user_record ){
vg_error( "No score set but tried to upload for track %u\n", i );
continue;
}
}
}
- if( count == 0 )
- return;
-
+ if( count == 0 ) return;
u32 send_size = sizeof(netmsg_set_score) +
count*sizeof(struct netmsg_score_record);
setscore->record_count = count;
nick.inetmsg_id = k_inetmsg_set_nickname;
memset( nick.nickname, 0, 16 );
- vg_strncpy( steam_username_at_startup, nick.nickname, 16 );
+ vg_strncpy( steam_username_at_startup, nick.nickname, 16,
+ k_strncpy_allow_cutoff );
SteamAPI_ISteamNetworkingSockets_SendMessageToConnection(
hSteamNetworkingSockets, cremote, &nick, sizeof(netmsg_set_nickname),