r5sdk/r5dev/public/server_class.h

35 lines
961 B
C
Raw Normal View History

2022-11-03 00:06:11 +01:00
#pragma once
2022-12-03 02:57:11 +01:00
class SendTable;
2022-11-03 00:06:11 +01:00
//-----------------------------------------------------------------------------
// Purpose: Server side class definition
//-----------------------------------------------------------------------------
class ServerClass
{
public:
const char* GetName(void) const
{
return m_pNetworkName;
}
public:
char* m_pNetworkName;
2022-12-03 02:57:11 +01:00
SendTable* m_pSendTable;
2022-11-03 00:06:11 +01:00
ServerClass* m_pNext;
int m_Unknown1;
int m_ClassID;
int m_InstanceBaselineIndex;
};
// If you do a DECLARE_SERVERCLASS, you need to do this inside the class definition.
#define DECLARE_SERVERCLASS() \
public: \
virtual ServerClass* GetServerClass(); \
static SendTable *m_pClassSendTable; \
template <typename T> friend int ServerClassInit(T *); \
virtual int YouForgotToImplementOrDeclareServerClass(); \
#define DECLARE_SERVERCLASS_NOBASE() \
public: \
template <typename T> friend int ServerClassInit(T *); \