Posted By: MPQ
how to pass pointers using event functions - 12/07/10 22:01
Hi everybody,
I have the folloing problem: There is no possiblity to pass pointers, references, parametes unsing the event function.
My objective is the following: removing an Entity (a local one!) when hitting an other entity!
example
I have the folloing problem: There is no possiblity to pass pointers, references, parametes unsing the event function.
My objective is the following: removing an Entity (a local one!) when hitting an other entity!
example
Code:
void ent_1(ENTITY* temp) { c_move (temp, ...); temp.emask = ENABLE_ENTITY; temp.event = remove_temp;//here is the problem: no parameter can be passed } void remove_temp (HERE NO PARAMENTER POSSIBLE) { ent_remove (THE temp POINTER is invalid here); }