|
2 registered members (vicknick, 1 invisible),
801
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Local Pointer !
[Re: jane]
#343818
10/10/10 16:46
10/10/10 16:46
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
seems somewhat illogical to store an identifier on each skill, if you need to use parent for anything else, store handles in the skills
#define ally skill5
ENTITY* get_ally(ENTITY* e){
return(ptr_for_handle(e.ally));
}
void set_ally(ENTITY* e, ENTITY* a){
e.ally = handle(a);
}
action ally_action(){
set_ally(me, you); //store ally
you = get_ally(me); //retrieve ally
}
|
|
|
|
|
|