version 1.106 | | version 1.107 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.106 2002/11/30 04:17:41 mwedel Exp $"; | | * "$Id: player.c,v 1.107 2002/12/03 07:40:18 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
CFParm CFP; | | CFParm CFP; |
int evtid; | | int evtid; |
| | |
if(key!='y'&&key!='Y'&&key!='q'&&key!='Q') { | | if(key!='y'&&key!='Y'&&key!='q'&&key!='Q') { |
op->contr->state=ST_PLAYING; | | op->contr->state=ST_PLAYING; |
new_draw_info(NDI_UNIQUE, 0,op,"OK, continuing to play."); | | new_draw_info(NDI_UNIQUE, 0,op,"OK, continuing to play."); |
return 1; | | return 1; |
} | | } |
| | |
/* GROS : Here we handle the REMOVE global event */ | | /* GROS : Here we handle the REMOVE global event */ |
evtid = EVENT_REMOVE; | | evtid = EVENT_REMOVE; |
CFP.Value[0] = (void *)(&evtid); | | CFP.Value[0] = (void *)(&evtid); |
| | |
op->contr->party_number=(-1); | | op->contr->party_number=(-1); |
if (settings.set_title == TRUE) | | if (settings.set_title == TRUE) |
op->contr->own_title[0]='\0'; | | op->contr->own_title[0]='\0'; |
| | |
if(!QUERY_FLAG(op,FLAG_WAS_WIZ)) { | | if(!QUERY_FLAG(op,FLAG_WAS_WIZ)) { |
sprintf(buf,"%s/%s/%s/%s.pl",settings.localdir,settings.playerdir,op->name,op->name); | | mapstruct *mp, *next; |
if(unlink(buf)== -1 && settings.debug >= llevDebug) | | |
perror("crossfire (delete character)"); | | /* We need to hunt for any per player unique maps in memory and |
| | * get rid of them. The trailing slash in the path is intentional, |
| | * so that players named 'Ab' won't match against players 'Abe' pathname |
| | */ |
| | sprintf(buf,"%s/%s/%s/", settings.localdir, settings.playerdir, op->name); |
| | for (mp=first_map; mp!=NULL; mp=next) { |
| | next = mp->next; |
| | if (!strncmp(mp->path, buf, strlen(buf))) |
| | delete_map(mp); |
| | } |
| | |
| | delete_character(op->name, 1); |
} | | } |
play_again(op); | | play_again(op); |
return 1; | | return 1; |
| | |
new_draw_info(NDI_UNIQUE, 0,op,"You have no applicable skill to use."); | | new_draw_info(NDI_UNIQUE, 0,op,"You have no applicable skill to use."); |
return; | | return; |
} | | } |
(void) do_skill(op,dir,NULL); | | (void) do_skill(op,op,dir,NULL); |
return; | | return; |
default: | | default: |
new_draw_info(NDI_UNIQUE, 0,op,"Illegal shoot type."); | | new_draw_info(NDI_UNIQUE, 0,op,"Illegal shoot type."); |