… | |
… | |
268 | */ |
268 | */ |
269 | get_rangevector (env, victim, &rv, 0); |
269 | get_rangevector (env, victim, &rv, 0); |
270 | if (rv.distance > 1) |
270 | if (rv.distance > 1) |
271 | return; |
271 | return; |
272 | |
272 | |
|
|
273 | env->play_sound (trap->sound ? trap->sound : sound_find ("trap_spring")); |
|
|
274 | |
273 | trap_show (trap, env); |
275 | trap_show (trap, env); |
274 | |
276 | |
275 | if (victim->type == PLAYER) // only count players as enemies |
277 | if (victim->type == PLAYER) // only count players as enemies |
276 | trap->enemy = victim; // set the victim as the traps enemy, so that summoned |
278 | trap->enemy = victim; // set the victim as the traps enemy, so that summoned |
277 | // creatures know who to attack. |
279 | // creatures know who to attack. |