version 1.79 | | version 1.80 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.79 2002/12/25 06:45:46 garbled Exp $"; | | * "$Id: attack.c,v 1.80 2003/01/04 00:28:52 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
CFP.Value[1] = (void *)(hitter); | | CFP.Value[1] = (void *)(hitter); |
CFP.Value[2] = (void *)(op); | | CFP.Value[2] = (void *)(op); |
GlobalEvent(&CFP); | | GlobalEvent(&CFP); |
maxdam+=op->stats.hp+1; | | /* maxdam needs to be the amount of damage it took to kill |
| | * this creature. The function(s) that call us have already |
| | * adjusted the creatures HP total, so that is negative. |
| | */ |
| | maxdam = dam + op->stats.hp + 1; |
| | |
if(QUERY_FLAG(op,FLAG_BLOCKSVIEW)) | | if(QUERY_FLAG(op,FLAG_BLOCKSVIEW)) |
update_all_los(op->map,op->x, op->y); /* makes sure los will be recalculated */ | | update_all_los(op->map,op->x, op->y); /* makes sure los will be recalculated */ |
| | |
} | | } |
| | |
/* See if the creature has been killed */ | | /* See if the creature has been killed */ |
rtn_kill = kill_object(op, dam, hitter, type); | | rtn_kill = kill_object(op, maxdam, hitter, type); |
if (rtn_kill != -1) | | if (rtn_kill != -1) |
return rtn_kill; | | return rtn_kill; |
| | |