Skip to content

Instantly share code, notes, and snippets.

View mjstahlberg's full-sized avatar

Maximilian Stahlberg mjstahlberg

View GitHub Profile
@mjstahlberg
mjstahlberg / gist:a45ca482479ca7191d9b
Last active August 29, 2015 14:19
ClientSpawnCBSE sketch
/** Sets shared client entity parameters. */
#define CLIENT_ENTITY_PARAMS(params)\
params.oldEnt = ent;\
params.Client_clientData = client;\
params.Health_maxHealth = BG_Class(pcl)->health
/** Copies component state for components that all client entities share. */
#define CLIENT_ENTIY_STATE_COPY()\
if (evolving) {\
*ent->entity->Get<HealthComponent>() = *oldEntity->Get<HealthComponent>();\