version 1.31 | | version 1.32 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.31 2001/02/06 05:56:28 cvs Exp $"; | | * "$Id: attack.c,v 1.32 2001/02/23 21:05:11 avogl Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
if(owner==NULL) | | if(owner==NULL) |
owner=hitter; | | owner=hitter; |
| | |
| | /* is the victim (op) standing on battleground? */ |
| | if (op_on_battleground(op, NULL, NULL)) battleg=1; |
| | |
/* Player killed something */ | | /* Player killed something */ |
if(owner->type==PLAYER) { | | if(owner->type==PLAYER) { |
Log_Kill(owner->name, | | Log_Kill(owner->name, |
| | |
new_draw_info(NDI_BLACK, 0,owner,buf); | | new_draw_info(NDI_BLACK, 0,owner,buf); |
}/* message should be displayed */ | | }/* message should be displayed */ |
| | |
if(op->type == PLAYER && hitter != op) | | /* If a player kills another player with melee, not on |
| | battleground, the "killer" looses 1 luck. Since this is |
| | not reversible, it's actually quite a pain IMHO. -AV */ |
| | if(op->type == PLAYER && hitter != op && !battleg) |
change_luck(hitter, -1); | | change_luck(hitter, -1); |
} /* was a player that hit this creature */ | | } /* was a player that hit this creature */ |
| | |
/* is the victim (op) standing on battleground? */ | | |
if (op_on_battleground(op, NULL, NULL)) battleg=1; | | |
| | |
/* Pet killed something. */ | | /* Pet killed something. */ |
if(get_owner(hitter)!=NULL) { | | if(get_owner(hitter)!=NULL) { |
(void) sprintf(buf,"%s killed %s with %s%s.",hitter->owner->name, | | (void) sprintf(buf,"%s killed %s with %s%s.",hitter->owner->name, |