version 1.27 | | version 1.28 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.27 2001/05/12 23:55:24 mwedel Exp $"; | | * "$Id: object.c,v 1.28 2001/05/29 04:41:53 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
owner->refcount++; | | owner->refcount++; |
} | | } |
| | |
#ifdef ALLOW_SKILLS | | |
static void set_skill_pointers (object *op, object *chosen_skill, | | static void set_skill_pointers (object *op, object *chosen_skill, |
object *exp_obj) | | object *exp_obj) |
{ | | { |
| | |
CLEAR_FLAG (op, FLAG_CAN_USE_SKILL); | | CLEAR_FLAG (op, FLAG_CAN_USE_SKILL); |
CLEAR_FLAG (op, FLAG_READY_SKILL); | | CLEAR_FLAG (op, FLAG_READY_SKILL); |
} | | } |
#endif | | |
| | |
| | |
/* | | /* |
| | |
return; | | return; |
set_owner_simple (op, owner); | | set_owner_simple (op, owner); |
| | |
#ifdef ALLOW_SKILLS /* set the pointers in op to inherit owners skill, exp_obj */ | | |
if (owner->type == PLAYER && owner->chosen_skill) | | if (owner->type == PLAYER && owner->chosen_skill) |
set_skill_pointers (op, owner->chosen_skill, | | set_skill_pointers (op, owner->chosen_skill, |
owner->chosen_skill->exp_obj); | | owner->chosen_skill->exp_obj); |
else if (op->type != PLAYER) | | else if (op->type != PLAYER) |
CLEAR_FLAG (op, FLAG_READY_SKILL); | | CLEAR_FLAG (op, FLAG_READY_SKILL); |
#endif | | |
} | | } |
| | |
/* Set the owner to clone's current owner and set the skill and experience | | /* Set the owner to clone's current owner and set the skill and experience |
| | |
return; | | return; |
set_owner_simple (op, owner); | | set_owner_simple (op, owner); |
| | |
#ifdef ALLOW_SKILLS | | |
if (clone->chosen_skill) | | if (clone->chosen_skill) |
set_skill_pointers (op, clone->chosen_skill, clone->exp_obj); | | set_skill_pointers (op, clone->chosen_skill, clone->exp_obj); |
else if (op->type != PLAYER) | | else if (op->type != PLAYER) |
CLEAR_FLAG (op, FLAG_READY_SKILL); | | CLEAR_FLAG (op, FLAG_READY_SKILL); |
#endif | | |
} | | } |
| | |
/* | | /* |