mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Fix compilation errors with ns_address.
Move to after netadr_t decl. Add steamclientpublic.h for CSteamID.
This commit is contained in:
@ -13,33 +13,9 @@
|
||||
#endif
|
||||
|
||||
#include "tier0/platform.h"
|
||||
#include <steam/steamclientpublic.h>
|
||||
#undef SetPort
|
||||
|
||||
enum ENSAddressType
|
||||
{
|
||||
kAddressDirect,
|
||||
kAddressP2P,
|
||||
kAddressProxiedGameServer,
|
||||
kAddressProxiedClient,
|
||||
|
||||
kAddressMax
|
||||
};
|
||||
|
||||
class ns_address
|
||||
{
|
||||
public:
|
||||
const netadr_t &GetAddress() const { return m_Address; }
|
||||
const CSteamID& GetSteamID() const { return m_ID; }
|
||||
const uint16 GetRemotePort() const { return m_nRemotePort; }
|
||||
ENSAddressType GetAddressType() const { return m_AddressType; }
|
||||
private:
|
||||
netadr_t m_Address;
|
||||
CSteamID m_ID;
|
||||
uint16 m_nRemotePort;
|
||||
int m_Unknown;
|
||||
ENSAddressType m_AddressType;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
NA_NULL = 0,
|
||||
@ -95,4 +71,29 @@ public: // members are public to avoid to much changes
|
||||
unsigned short port;
|
||||
} netadr_t;
|
||||
|
||||
enum ENSAddressType
|
||||
{
|
||||
kAddressDirect,
|
||||
kAddressP2P,
|
||||
kAddressProxiedGameServer,
|
||||
kAddressProxiedClient,
|
||||
|
||||
kAddressMax
|
||||
};
|
||||
|
||||
class ns_address
|
||||
{
|
||||
public:
|
||||
const netadr_t &GetAddress() const { return m_Address; }
|
||||
const CSteamID& GetSteamID() const { return m_ID; }
|
||||
const uint16 GetRemotePort() const { return m_nRemotePort; }
|
||||
ENSAddressType GetAddressType() const { return m_AddressType; }
|
||||
private:
|
||||
netadr_t m_Address;
|
||||
CSteamID m_ID;
|
||||
uint16 m_nRemotePort;
|
||||
int m_Unknown;
|
||||
ENSAddressType m_AddressType;
|
||||
};
|
||||
|
||||
#endif // NETADR_H
|
||||
|
Reference in New Issue
Block a user