mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 22:58:01 +03:00
Fixes OnChatStringRecieved returning previous message data
This commit is contained in:
parent
c4f33a1d3d
commit
a82f6fc8ed
@ -334,8 +334,13 @@ namespace Facepunch.Steamworks
|
|||||||
readData = client.native.matchmaking.GetLobbyChatEntry( CurrentLobby, (int)callback.ChatID, out steamid, (IntPtr)p, chatMessageData.Length, out chatEntryType );
|
readData = client.native.matchmaking.GetLobbyChatEntry( CurrentLobby, (int)callback.ChatID, out steamid, (IntPtr)p, chatMessageData.Length, out chatEntryType );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OnChatMessageRecieved?.Invoke( steamid, chatMessageData, readData );
|
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>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user