version 1.129 | | version 1.130 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.129 2006/08/31 07:41:27 mwedel Exp $"; | | * "$Id: attack.c,v 1.130 2006/09/03 03:17:59 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
int hit_something=0; | | int hit_something=0; |
tag_t victim_tag, hitter_tag; | | tag_t victim_tag, hitter_tag; |
sint16 victim_x, victim_y; | | sint16 victim_x, victim_y; |
| | mapstruct *victim_map; |
| | |
/* Disassemble missile */ | | /* Disassemble missile */ |
if (op->inv) { | | if (op->inv) { |
| | |
/* Try to hit victim */ | | /* Try to hit victim */ |
victim_x = victim->x; | | victim_x = victim->x; |
victim_y = victim->y; | | victim_y = victim->y; |
| | victim_map = victim->map; |
victim_tag = victim->count; | | victim_tag = victim->count; |
hitter_tag = hitter->count; | | hitter_tag = hitter->count; |
/* Lauwenmark: Handling plugin attack event for thrown items */ | | /* Lauwenmark: Handling plugin attack event for thrown items */ |
| | |
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, victim->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); |