version 1.99 | | version 1.100 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.99 2004/06/13 17:30:22 akirschbaum Exp $"; | | * "$Id: attack.c,v 1.100 2004/06/16 07:09:44 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
} | | } |
} | | } |
else | | else |
| | |
hit_something = attack_ob_simple (victim, hitter, op->stats.dam, | | hit_something = attack_ob_simple (victim, hitter, op->stats.dam, |
op->stats.wc); | | op->stats.wc); |
| | |
| | |
* arrow, move_apply() calls this function, arrow sticks in demon, | | * arrow, move_apply() calls this function, arrow sticks in demon, |
* attack_ob_simple() returns, and we've got an arrow that still exists | | * attack_ob_simple() returns, and we've got an arrow that still exists |
* but is no longer on the map. Ugh. (Beware: Such things can happen at | | * but is no longer on the map. Ugh. (Beware: Such things can happen at |
* other places as well!) */ | | * other places as well!) |
| | */ |
if (was_destroyed (hitter, hitter_tag) || hitter->env != NULL) { | | if (was_destroyed (hitter, hitter_tag) || hitter->env != NULL) { |
if (container) { | | if (container) { |
remove_ob (container); | | remove_ob (container); |
| | |
| | |
/* Missile hit victim */ | | /* Missile hit victim */ |
/* if the speed is > 10, then this is a fast moving arrow, we go straight | | /* if the speed is > 10, then this is a fast moving arrow, we go straight |
through the target */ | | * through the target |
| | */ |
if (hit_something && op->speed <= 10.0) | | if (hit_something && op->speed <= 10.0) |
{ | | { |
/* Stop arrow */ | | /* Stop arrow */ |
| | |
remove_ob (hitter); | | remove_ob (hitter); |
hitter->x = victim_x; | | hitter->x = victim_x; |
hitter->y = victim_y; | | hitter->y = victim_y; |
insert_ob_in_map (hitter, hitter->map, hitter,0); | | insert_ob_in_map (hitter, victim->map, hitter,0); |
} else { | | } else { |
/* Else leave arrow where it is */ | | /* Else leave arrow where it is */ |
merge_ob (hitter, NULL); | | merge_ob (hitter, NULL); |