action MyAction()
{
my.skill99 = (void*)MyAction;
...
}
action YourAction()
{
my.skill99 = (void*)YourAction;
...
}
ENTITY* ent_duplicate(ENTITY* source_ent)
{
ENTITY* target_ent = ent_create(source_ent.type, 0, (void*)source_ent.skill99);
memcpy(&target_ent.x, &source_ent.x, sizeof(ENTITY)-(sizeof(C_LINK)+sizeof(var)));
// ent_clone(target_ent); //if required
return(target_ent);
}