version 1.175 | | version 1.176 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.175 2005/09/17 13:24:48 akirschbaum Exp $"; | | * "$Id: player.c,v 1.176 2005/09/24 09:28:05 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* There are some elements we want initialized to non zero value - | | /* There are some elements we want initialized to non zero value - |
* we deal with that below this point. | | * we deal with that below this point. |
*/ | | */ |
p->party_number=-1; | | p->party=NULL; |
p->outputs_sync=16; /* Every 2 seconds */ | | p->outputs_sync=16; /* Every 2 seconds */ |
p->outputs_count=1; /* Keeps present behaviour */ | | p->outputs_count=1; /* Keeps present behaviour */ |
p->unapply = unapply_nochoice; | | p->unapply = unapply_nochoice; |
| | |
void get_party_password(object *op, int partyid) { | | void get_party_password(object *op, int partyid) { |
op->contr->write_buf[0]='\0'; | | op->contr->write_buf[0]='\0'; |
op->contr->state=ST_GET_PARTY_PASSWORD; | | op->contr->state=ST_GET_PARTY_PASSWORD; |
op->contr->party_number_to_join = partyid; | | op->contr->party_to_join = find_party_struct(partyid); |
send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, "What is the password?\n:"); | | send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, "What is the password?\n:"); |
} | | } |
| | |
| | |
| | |
strcpy(op->contr->killer,"quit"); | | strcpy(op->contr->killer,"quit"); |
check_score(op); | | check_score(op); |
op->contr->party_number=(-1); | | op->contr->party=NULL; |
if (settings.set_title == TRUE) | | if (settings.set_title == TRUE) |
op->contr->own_title[0]='\0'; | | op->contr->own_title[0]='\0'; |
| | |
| | |
*/ | | */ |
| | |
else if ((mon->stats.hp>=0) && QUERY_FLAG(mon, FLAG_ALIVE) && | | else if ((mon->stats.hp>=0) && QUERY_FLAG(mon, FLAG_ALIVE) && |
((mon->type!=PLAYER || op->contr->party_number==-1 || | | ((mon->type!=PLAYER || op->contr->party==NULL || |
op->contr->party_number!=mon->contr->party_number))) { | | op->contr->party!=mon->contr->party))) { |
| | |
/* If the player hasn't hit something this tick, and does | | /* If the player hasn't hit something this tick, and does |
* so, give them speed boost based on weapon speed. Doing | | * so, give them speed boost based on weapon speed. Doing |
| | |
* should probably be embedded in an else statement. | | * should probably be embedded in an else statement. |
*/ | | */ |
| | |
op->contr->party_number=(-1); | | op->contr->party=NULL; |
if (settings.set_title == TRUE) | | if (settings.set_title == TRUE) |
op->contr->own_title[0]='\0'; | | op->contr->own_title[0]='\0'; |
new_draw_info(NDI_UNIQUE|NDI_ALL, 0,NULL, buf); | | new_draw_info(NDI_UNIQUE|NDI_ALL, 0,NULL, buf); |