version 1.115 | | version 1.116 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.115 2003/01/08 08:39:20 mwedel Exp $"; | | * "$Id: player.c,v 1.116 2003/01/23 07:38:43 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
int save_life(object *op) { | | int save_life(object *op) { |
object *tmp; | | object *tmp; |
char buf[MAX_BUF]; | | |
if(!QUERY_FLAG(op,FLAG_LIFESAVE)) | | if(!QUERY_FLAG(op,FLAG_LIFESAVE)) |
return 0; | | return 0; |
| | |
for(tmp=op->inv;tmp!=NULL;tmp=tmp->below) | | for(tmp=op->inv;tmp!=NULL;tmp=tmp->below) |
if(QUERY_FLAG(tmp, FLAG_APPLIED)&&QUERY_FLAG(tmp,FLAG_LIFESAVE)) { | | if(QUERY_FLAG(tmp, FLAG_APPLIED)&&QUERY_FLAG(tmp,FLAG_LIFESAVE)) { |
play_sound_map(op->map, op->x, op->y, SOUND_OB_EVAPORATE); | | play_sound_map(op->map, op->x, op->y, SOUND_OB_EVAPORATE); |
sprintf(buf,"Your %s vibrates violently, then evaporates.", | | new_draw_info_format(NDI_UNIQUE, 0,op, |
| | "Your %s vibrates violently, then evaporates.", |
query_name(tmp)); | | query_name(tmp)); |
new_draw_info(NDI_UNIQUE, 0,op,buf); | | |
if (op->contr) | | if (op->contr) |
esrv_del_item(op->contr, tmp->count); | | esrv_del_item(op->contr, tmp->count); |
remove_ob(tmp); | | remove_ob(tmp); |
| | |
op->stats.hp = op->stats.maxhp; | | op->stats.hp = op->stats.maxhp; |
if(op->stats.food<0) | | if(op->stats.food<0) |
op->stats.food = 999; | | op->stats.food = 999; |
/*enter_player_savebed(op);*/ /* bring him home. */ | | fix_player(op); |
return 1; | | return 1; |
} | | } |
LOG(llevError,"Error: LIFESAVE set without applied object.\n"); | | LOG(llevError,"Error: LIFESAVE set without applied object.\n"); |