version 1.117 | | version 1.118 |
---|
| | |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: object.c,v 1.117 2005/12/10 14:27:09 akirschbaum Exp $"; | | * "$Id: object.c,v 1.118 2006/01/01 20:36:07 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
int x=op->x, y=op->y; | | int x=op->x, y=op->y; |
MoveType move_on, move_slow, move_block; | | MoveType move_on, move_slow, move_block; |
| | |
if (QUERY_FLAG(op, FLAG_WIZPASS)) | | |
return 0; | | |
| | |
if(QUERY_FLAG(op,FLAG_NO_APPLY)) | | if(QUERY_FLAG(op,FLAG_NO_APPLY)) |
return 0; | | return 0; |
| | |
| | |
* space doesn't slow down swimming (for example), if you can't actually | | * space doesn't slow down swimming (for example), if you can't actually |
* swim on that space, can't use it to avoid the penalty. | | * swim on that space, can't use it to avoid the penalty. |
*/ | | */ |
| | if (!QUERY_FLAG(op, FLAG_WIZPASS)) { |
if ((!op->move_type && tmp->move_slow & MOVE_WALK) || | | if ((!op->move_type && tmp->move_slow & MOVE_WALK) || |
((op->move_type & tmp->move_slow) && | | ((op->move_type & tmp->move_slow) && |
(op->move_type & ~tmp->move_slow & ~tmp->move_block)==0)) { | | (op->move_type & ~tmp->move_slow & ~tmp->move_block)==0)) { |
| | |
if (op->type==PLAYER) { | | if (op->type==PLAYER) { |
if ((QUERY_FLAG(tmp,FLAG_IS_HILLY) && find_skill_by_number(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(op,SK_WOODSMAN))) { | | (QUERY_FLAG(tmp,FLAG_IS_WOODED) && find_skill_by_number(op,SK_WOODSMAN))) { |
diff=diff/4.0; | | diff /= 4.0; |
} | | } |
} | | } |
op->speed_left -= diff; | | op->speed_left -= diff; |
} | | } |
| | } |
| | |
/* Basically same logic as above, except now for actual apply. */ | | /* Basically same logic as above, except now for actual apply. */ |
if ((!op->move_type && tmp->move_on & MOVE_WALK) || | | if ((!op->move_type && tmp->move_on & MOVE_WALK) || |