Fixes OnChatStringRecieved returning previous message data

This commit is contained in:
Garry Newman 2018-02-14 11:35:16 +00:00
parent c4f33a1d3d
commit a82f6fc8ed

View File

@ -334,8 +334,13 @@ private unsafe void OnLobbyChatMessageRecievedAPI(LobbyChatMsg_t callback, bool
readData = client.native.matchmaking.GetLobbyChatEntry( CurrentLobby, (int)callback.ChatID, out steamid, (IntPtr)p, chatMessageData.Length, out chatEntryType );
}
OnChatMessageRecieved?.Invoke( steamid, chatMessageData, readData );
OnChatStringRecieved?.Invoke(steamid, Encoding.UTF8.GetString(chatMessageData));
if ( readData > 0 )
{
OnChatStringRecieved?.Invoke( steamid, Encoding.UTF8.GetString( chatMessageData, 0, readData ) );
}
}
/// <summary>