fixed windows builds

This commit is contained in:
2025-07-20 00:45:31 +03:00
parent 070c3ff309
commit fb4c201921
26 changed files with 519 additions and 338 deletions

View File

@@ -2,6 +2,7 @@
#define ENTITY_H
#include "engine.h"
#include "interface.h"
#include "tier1/utlvector.h"
#include "math3d.h"
@@ -72,10 +73,11 @@ public:
typedef CBaseEntity*(*EntityRegistryFn)( void );
typedef C_BaseEntity*(*ClientEntityRegistryFn)( void );
interface CEntityRegistry
class CEntityRegistryObject
{
public:
CEntityRegistry( const char *szName, const char *szClass, EntityRegistryFn pfn );
CEntityRegistryObject( const char *szName, const char *szClass, EntityRegistryFn pfn );
const char *m_szName;
const char *m_szClass;
@@ -83,6 +85,14 @@ public:
ClientEntityRegistryFn m_pClientfn = 0;
};
interface IEntityManager: public IInterface
{
public:
CUtlVector<CBaseEntity*> m_entities;
CUtlVector<CEntityRegistryObject*> m_RegisteredEntities;
};
IEntityManager *EntityManager();
#define DECLARE_ENTITY(name, class) \
@@ -90,7 +100,7 @@ CBaseEntity *__entity_alloc_##name() \
{ \
return new class; \
}; \
CEntityRegistry __entity_##name##_registry(#name, #class, __entity_alloc_##name); \
CEntityRegistryObject __entity_##name##_registry(#name, #class, __entity_alloc_##name); \
//-----------------------------------------------------------------------------
@@ -127,8 +137,4 @@ C_BaseEntity *__c_entity_alloc_##server() \
C_EntityRegistry __c_entity_##server##_registry(#server, __c_entity_alloc_##server); \
extern CUtlVector<CBaseEntity*> g_entities;
extern CUtlVector<CEntityRegistry*> g_RegisteredEntities;
#endif