Skip to content

Commit 293de86

Browse files
author
nitrocaster
committed
Substitute SERVER_ENTITY_DECLARE_XXX macros.
1 parent 41cc060 commit 293de86

8 files changed

+749
-189
lines changed

src/xrServerEntities/xrServer_Object_Base.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,25 @@ class CSE_ALifeItemPDA;
3737
#pragma warning(push)
3838
#pragma warning(disable:4005)
3939

40-
SERVER_ENTITY_DECLARE_BEGIN(CPureServerObject,IPureServerObject)
40+
class CPureServerObject : public IPureServerObject
41+
{
42+
using inherited = IPureServerObject;
43+
public:
4144
virtual ~CPureServerObject(){}
4245
virtual void load(IReader &tFileStream);
4346
virtual void save(IWriter &tMemoryStream);
4447
virtual void load(NET_Packet &tNetPacket);
4548
virtual void save(NET_Packet &tNetPacket);
4649
};
4750

48-
SERVER_ENTITY_DECLARE_BEGIN3(CSE_Abstract,ISE_Abstract,CPureServerObject,CScriptValueContainer)
51+
class CSE_Abstract :
52+
public ISE_Abstract,
53+
public CPureServerObject,
54+
public CScriptValueContainer
55+
{
56+
using inherited1 = ISE_Abstract;
57+
using inherited2 = CPureServerObject;
58+
using inherited3 = CScriptValueContainer;
4959
public:
5060
enum ESpawnFlags {
5161
flSpawnEnabled = u32(1 << 0),

src/xrServerEntities/xrServer_Objects.h

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@
165165
//------------------------------------------------------------------------------
166166
#define SPAWN_VERSION u16(128)
167167

168-
SERVER_ENTITY_DECLARE_BEGIN2(CSE_Shape,ISE_Shape,CShapeData)
168+
class CSE_Shape :
169+
public ISE_Shape,
170+
public CShapeData
171+
{
172+
using inherited1 = ISE_Shape;
173+
using inherited2 = CShapeData;
169174
public:
170175
void cform_read (NET_Packet& P);
171176
void cform_write (NET_Packet& P);
@@ -175,19 +180,38 @@ SERVER_ENTITY_DECLARE_BEGIN2(CSE_Shape,ISE_Shape,CShapeData)
175180
virtual void __stdcall assign_shapes (CShapeData::shape_def* shapes, u32 cnt);
176181
};
177182

178-
SERVER_ENTITY_DECLARE_BEGIN(CSE_Spectator,CSE_Abstract)
183+
class CSE_Spectator :
184+
public CSE_Abstract
185+
{
186+
using inherited = CSE_Abstract;
187+
public:
179188
CSE_Spectator (LPCSTR caSection);
180189
virtual ~CSE_Spectator ();
181190
virtual u8 g_team ();
182-
SERVER_ENTITY_DECLARE_END
191+
virtual void UPDATE_Read (NET_Packet& P);
192+
virtual void UPDATE_Write (NET_Packet& P);
193+
virtual void STATE_Read (NET_Packet& P, u16 size);
194+
virtual void STATE_Write (NET_Packet& P);
195+
SERVER_ENTITY_EDITOR_METHODS
196+
};
183197

184-
SERVER_ENTITY_DECLARE_BEGIN(CSE_Temporary,CSE_Abstract)
198+
class CSE_Temporary : public CSE_Abstract
199+
{
200+
using inherited = CSE_Abstract;
201+
public:
185202
u32 m_tNodeID;
186203
CSE_Temporary (LPCSTR caSection);
187204
virtual ~CSE_Temporary ();
188-
SERVER_ENTITY_DECLARE_END
205+
virtual void UPDATE_Read(NET_Packet& P);
206+
virtual void UPDATE_Write(NET_Packet& P);
207+
virtual void STATE_Read(NET_Packet& P, u16 size);
208+
virtual void STATE_Write(NET_Packet& P);
209+
SERVER_ENTITY_EDITOR_METHODS
210+
};
189211

190-
SERVER_ENTITY_DECLARE_BEGIN0(CSE_PHSkeleton)
212+
class CSE_PHSkeleton
213+
{
214+
public:
191215
CSE_PHSkeleton(LPCSTR caSection);
192216
virtual ~CSE_PHSkeleton();
193217

@@ -209,17 +233,31 @@ enum{
209233
virtual void data_load (NET_Packet &tNetPacket);
210234
virtual void data_save (NET_Packet &tNetPacket);
211235
public:
212-
SERVER_ENTITY_DECLARE_END
236+
virtual void UPDATE_Read(NET_Packet& P);
237+
virtual void UPDATE_Write(NET_Packet& P);
238+
virtual void STATE_Read(NET_Packet& P, u16 size);
239+
virtual void STATE_Write(NET_Packet& P);
240+
SERVER_ENTITY_EDITOR_METHODS
241+
};
213242

214-
SERVER_ENTITY_DECLARE_BEGIN2(CSE_AbstractVisual,CSE_Abstract,CSE_Visual)
215-
typedef CSE_Abstract inherited1;
216-
typedef CSE_Visual inherited2;
243+
class CSE_AbstractVisual :
244+
public CSE_Abstract,
245+
public CSE_Visual
246+
{
247+
public:
248+
using inherited1 = CSE_Abstract;
249+
using inherited2 = CSE_Visual;
217250

218251
CSE_AbstractVisual (LPCSTR caSection);
219252
virtual ~CSE_AbstractVisual ();
220253
virtual CSE_Visual* __stdcall visual ();
221254
LPCSTR getStartupAnimation ();
222-
SERVER_ENTITY_DECLARE_END
255+
virtual void UPDATE_Read(NET_Packet& P);
256+
virtual void UPDATE_Write(NET_Packet& P);
257+
virtual void STATE_Read(NET_Packet& P, u16 size);
258+
virtual void STATE_Write(NET_Packet& P);
259+
SERVER_ENTITY_EDITOR_METHODS
260+
};
223261

224262
#ifndef AI_COMPILER
225263
extern CSE_Abstract *F_entity_Create (LPCSTR caSection);

0 commit comments

Comments
 (0)