version 1.96 | | version 1.97 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.96 2005/04/16 05:30:47 mwedel Exp $"; | | * "$Id: object.c,v 1.97 2005/07/15 13:51:49 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (check_walk_off && (QUERY_FLAG (op, FLAG_FLYING) ? | | if (check_walk_off && (QUERY_FLAG (op, FLAG_FLYING) ? |
QUERY_FLAG (tmp, FLAG_FLY_OFF) : QUERY_FLAG (tmp, FLAG_WALK_OFF))) { | | QUERY_FLAG (tmp, FLAG_FLY_OFF) : QUERY_FLAG (tmp, FLAG_WALK_OFF))) { |
| | |
move_apply_func (tmp, op, NULL); | | move_apply(tmp, op, NULL); |
if (was_destroyed (op, tag)) { | | if (was_destroyed (op, tag)) { |
LOG (llevError, "BUG: remove_ob(): name %s, archname %s destroyed " | | LOG (llevError, "BUG: remove_ob(): name %s, archname %s destroyed " |
"leaving object\n", tmp->name, tmp->arch->name); | | "leaving object\n", tmp->name, tmp->arch->name); |
| | |
sub_weight (op->env, op->weight * i); | | sub_weight (op->env, op->weight * i); |
op->nrof -= i; | | op->nrof -= i; |
if (tmp) { | | if (tmp) { |
(*esrv_send_item_func) (tmp, op); | | esrv_send_item(tmp, op); |
} | | } |
} else { | | } else { |
remove_ob (op); | | remove_ob (op); |
op->nrof = 0; | | op->nrof = 0; |
if (tmp) { | | if (tmp) { |
(*esrv_del_item_func) (tmp->contr, op->count); | | esrv_del_item(tmp->contr, op->count); |
} | | } |
} | | } |
} | | } |
| | |
for (tmp = above; tmp != NULL; tmp = tmp->above) | | for (tmp = above; tmp != NULL; tmp = tmp->above) |
if (tmp->type == PLAYER) { | | if (tmp->type == PLAYER) { |
if (op->nrof) | | if (op->nrof) |
(*esrv_send_item_func) (tmp, op); | | esrv_send_item(tmp, op); |
else | | else |
(*esrv_del_item_func) (tmp->contr, op->count); | | esrv_del_item(tmp->contr, op->count); |
} | | } |
} | | } |
| | |
| | |
| | |
diff=(SLOW_PENALTY(tmp)*FABS(op->speed)); | | diff=(SLOW_PENALTY(tmp)*FABS(op->speed)); |
if (op->type==PLAYER) { | | if (op->type==PLAYER) { |
if ((QUERY_FLAG(tmp,FLAG_IS_HILLY) && (*find_skill_by_number_func)(op,SK_CLIMBING)) || | | if ((QUERY_FLAG(tmp,FLAG_IS_HILLY) && find_skill_by_number(op,SK_CLIMBING)) || |
(QUERY_FLAG(tmp,FLAG_IS_WOODED) && (*find_skill_by_number_func)(op,SK_WOODSMAN))) { | | (QUERY_FLAG(tmp,FLAG_IS_WOODED) && find_skill_by_number(op,SK_WOODSMAN))) { |
diff=diff/4.0; | | diff=diff/4.0; |
} | | } |
} | | } |
| | |
} | | } |
if(QUERY_FLAG(op,FLAG_FLYING)?QUERY_FLAG(tmp,FLAG_FLY_ON): | | if(QUERY_FLAG(op,FLAG_FLYING)?QUERY_FLAG(tmp,FLAG_FLY_ON): |
QUERY_FLAG(tmp,FLAG_WALK_ON)) { | | QUERY_FLAG(tmp,FLAG_WALK_ON)) { |
move_apply_func (tmp, op, originator); | | move_apply(tmp, op, originator); |
if (was_destroyed (op, tag)) | | if (was_destroyed (op, tag)) |
return 1; | | return 1; |
/* what the person/creature stepped onto has moved the object | | /* what the person/creature stepped onto has moved the object |