eco2d/code/apps/server/header/modules/net.h

19 lines
382 B
C
Raw Normal View History

2021-01-17 15:33:56 +00:00
#pragma once
#include "flecs/flecs.h"
#include "flecs/flecs_meta.h"
2021-01-18 12:16:38 +00:00
ECS_STRUCT(ClientInfo, {
2021-01-17 15:33:56 +00:00
uint16_t peer_id;
});
typedef struct {
2021-01-18 12:16:38 +00:00
ECS_DECLARE_ENTITY(EcsClient);
ECS_DECLARE_COMPONENT(ClientInfo);
2021-01-17 15:33:56 +00:00
} Net;
#define NetImportHandles(handles)\
2021-01-18 12:16:38 +00:00
ECS_IMPORT_ENTITY(handles, EcsClient);\
ECS_IMPORT_COMPONENT(handles, ClientInfo);\
2021-01-17 15:33:56 +00:00
2021-01-19 10:19:12 +00:00
void NetImport(ecs_world_t *ecs);