From 778db29a689566f9aa743a4b12a0ea1897f3d80a Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 5 Oct 2016 12:04:22 +0100 Subject: [PATCH] Fixed ValidateAuthTicketResponse layout --- Facepunch.Steamworks.Test/Server/Server.cs | 1 + Facepunch.Steamworks/Callbacks/User.cs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks.Test/Server/Server.cs b/Facepunch.Steamworks.Test/Server/Server.cs index ca228d9..05369f8 100644 --- a/Facepunch.Steamworks.Test/Server/Server.cs +++ b/Facepunch.Steamworks.Test/Server/Server.cs @@ -44,6 +44,7 @@ namespace Facepunch.Steamworks.Test Authed = status == ServerAuth.Status.OK; Assert.AreEqual( steamid, client.SteamId ); + Assert.AreEqual( steamid, ownerid ); Console.WriteLine( "steamid: {0}", steamid ); Console.WriteLine( "ownerid: {0}", ownerid ); diff --git a/Facepunch.Steamworks/Callbacks/User.cs b/Facepunch.Steamworks/Callbacks/User.cs index a005722..b988c2d 100644 --- a/Facepunch.Steamworks/Callbacks/User.cs +++ b/Facepunch.Steamworks/Callbacks/User.cs @@ -6,8 +6,8 @@ using System.Text; namespace Facepunch.Steamworks.Callbacks.User { - [StructLayout( LayoutKind.Sequential )] - internal class ValidateAuthTicketResponse + [StructLayout( LayoutKind.Explicit )] + internal struct ValidateAuthTicketResponse { 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 }; + [FieldOffset(0)] public ulong SteamID; + [FieldOffset(8)] public Response AuthResponse; + [FieldOffset(12)] public ulong OwnerSteamID; public const int CallbackId = Index.User + 43;