View Single Post
Re: Bot avatar in scoreboard
Old
  (#7)
Immortal_BLG
Member
 
Status: Offline
Posts: 171
Join Date: Nov 2007
Location: Russian Federation
Default Re: Bot avatar in scoreboard - 01-03-2012

SORRY!!!
I forgot that the class CSteamID has no alignment!
So you need to write before declaration "union SteamID_t":
Code:
#pragma pack (push, 1)
and after declaration:
Code:
#pragma pack (pop)
In general, the declaration of "union SteamID_t" should look like this:
Code:
#pragma pack (push, 1)	// Structures must be packed (byte-aligned)
// 64 bits total
union SteamID_t	// From CSteamID class....
{
	#pragma warning (push)
	#pragma warning (disable: 4201)	// nameless union is nonstandard
		struct /* Unnamed */
		{
			unsigned int m_unAccountID       : 32;	// unique account identifier
			unsigned int m_unAccountInstance : 20;	// dynamic instance ID (used for multiseat type accounts only)
			unsigned int m_EAccountType      : 4;	// type of account - can't show as EAccountType, due to signed / unsigned difference
			EUniverse    m_EUniverse         : 8;	// universe this account belongs to
		};
	#pragma warning (pop)	// no more anonymous unions until next time

	unsigned long long m_unAll64Bits;
} steamID;
#pragma pack (pop)	// Reset default packing.
P.S. However, in my opinion it is not important....
  
Reply With Quote