Fixed ValidateAuthTicketResponse layout

This commit is contained in:
Garry Newman 2016-10-05 12:04:22 +01:00
parent 5fa72a0275
commit 778db29a68
2 changed files with 6 additions and 2 deletions

View File

@ -44,6 +44,7 @@ namespace Facepunch.Steamworks.Test
Authed = status == ServerAuth.Status.OK; Authed = status == ServerAuth.Status.OK;
Assert.AreEqual( steamid, client.SteamId ); Assert.AreEqual( steamid, client.SteamId );
Assert.AreEqual( steamid, ownerid );
Console.WriteLine( "steamid: {0}", steamid ); Console.WriteLine( "steamid: {0}", steamid );
Console.WriteLine( "ownerid: {0}", ownerid ); Console.WriteLine( "ownerid: {0}", ownerid );

View File

@ -6,8 +6,8 @@ using System.Text;
namespace Facepunch.Steamworks.Callbacks.User namespace Facepunch.Steamworks.Callbacks.User
{ {
[StructLayout( LayoutKind.Sequential )] [StructLayout( LayoutKind.Explicit )]
internal class ValidateAuthTicketResponse internal struct ValidateAuthTicketResponse
{ {
public enum Response : int public enum Response : int
{ {
@ -23,8 +23,11 @@ namespace Facepunch.Steamworks.Callbacks.User
PublisherIssuedBan = 9, // The user is banned for this game. The ban came via the web api and not VAC PublisherIssuedBan = 9, // The user is banned for this game. The ban came via the web api and not VAC
}; };
[FieldOffset(0)]
public ulong SteamID; public ulong SteamID;
[FieldOffset(8)]
public Response AuthResponse; public Response AuthResponse;
[FieldOffset(12)]
public ulong OwnerSteamID; public ulong OwnerSteamID;
public const int CallbackId = Index.User + 43; public const int CallbackId = Index.User + 43;