ok i ll try out:
ok it looks like that the me pointer is automatically passed, thank you superku. But an other problem arises: When the entity is removed, the local entity of the calling function becomes invalid, what to do
void remove_temp()
{
wait(1);
ent_remove(me);//now the temp pointer of the calling function becomes invalid
}
void ent_1(ENTITY* temp)
{
temp.emask = ENABLE_ENTITY;
temp.event = remove_temp;//here is the problem: no parameter can be passed
while(1)//while(temp)
{
c_move (temp, ...);//temp becomes invalid when it is removed, invalid pointer error
wait(1);
}
}
no idea?