version 1.11 | | version 1.12 |
---|
| | |
/* | | /* |
* static char *rcsid_time_c = | | * static char *rcsid_time_c = |
* "$Id: time.c,v 1.11 2000/10/16 19:19:31 peterm Exp $"; | | * "$Id: time.c,v 1.12 2000/10/23 18:13:56 peterm Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
object *tmp2; | | object *tmp2; |
if(op->stats.hp) { | | if(op->stats.hp) { |
for(tmp2= tmp->inv;tmp2;tmp2=tmp2->below) { | | for(tmp2= tmp->inv;tmp2;tmp2=tmp2->below) { |
if(!strcmp(op->slaying,tmp->name)) detected=1; | | if(op->slaying && !strcmp(op->slaying,tmp->name)) detected=1; |
if(tmp2->type==FORCE && !strcmp(tmp2->slaying,op->slaying)) detected=1; | | if(tmp2->type==FORCE &&tmp2->slaying && !strcmp(tmp2->slaying,op->slaying)) detected=1; |
} | | } |
} | | } |
if (!strcmp(op->slaying,tmp->name)) { | | if (op->slaying && !strcmp(op->slaying,tmp->name)) { |
detected = 1; | | detected = 1; |
} | | } |
else if (tmp->type==SPECIAL_KEY && tmp->slaying==op->slaying) | | else if (tmp->type==SPECIAL_KEY && tmp->slaying==op->slaying) |