version 1.35 | | version 1.36 |
---|
| | |
/* | | /* |
* static char *rcsid_rune_c = | | * static char *rcsid_rune_c = |
* "$Id: rune.c,v 1.35 2003/09/13 05:02:12 mwedel Exp $"; | | * "$Id: rune.c,v 1.36 2003/12/01 05:45:18 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
{ | | { |
object *env; | | object *env; |
tag_t trap_tag = trap->count; | | tag_t trap_tag = trap->count; |
| | rv_vector rv; |
| | |
| | |
/* Prevent recursion */ | | /* Prevent recursion */ |
if (trap->stats.hp <= 0) | | if (trap->stats.hp <= 0) |
| | |
* knows what hit him. | | * knows what hit him. |
*/ | | */ |
for (env = trap; env->env != NULL; env = env->env) ; | | for (env = trap; env->env != NULL; env = env->env) ; |
| | |
| | /* If the victim is not next to this trap, don't set it off. |
| | * players shouldn't get hit by firing arrows at a door for example. |
| | * At the same time, the trap will stick around until detonated |
| | */ |
| | get_rangevector(env, victim, &rv, 0); |
| | if (rv.distance > 1) return; |
| | |
trap_show(trap,env); | | trap_show(trap,env); |
| | |
/* Only if it is a spell do we proceed here */ | | /* Only if it is a spell do we proceed here */ |