version 1.170 | | version 1.171 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.170 2005/08/10 04:57:47 mwedel Exp $"; | | * "$Id: player.c,v 1.171 2005/08/12 08:18:59 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#include <skills.h> | | #include <skills.h> |
#include <newclient.h> | | #include <newclient.h> |
| | |
player *find_player(char *plname) | | player *find_player(const char *plname) |
{ | | { |
player *pl; | | player *pl; |
for(pl=first_player;pl!=NULL;pl=pl->next) | | for(pl=first_player;pl!=NULL;pl=pl->next) |
| | |
return NULL; | | return NULL; |
} | | } |
| | |
player* find_player_partial_name( char* plname ) | | player* find_player_partial_name( const char* plname ) |
{ | | { |
player* pl; | | player* pl; |
player* found = NULL; | | player* found = NULL; |
| | |
close_and_delete(fp, comp); | | close_and_delete(fp, comp); |
} | | } |
| | |
int playername_ok(char *cp) { | | int playername_ok(const char *cp) { |
/* Don't allow - or _ as first character in the name */ | | /* Don't allow - or _ as first character in the name */ |
if (*cp == '-' || *cp == '_') return 0; | | if (*cp == '-' || *cp == '_') return 0; |
| | |
| | |
* in the right type container (quiver). Pointer to the | | * in the right type container (quiver). Pointer to the |
* found object is returned. | | * found object is returned. |
*/ | | */ |
object *find_arrow(object *op, char *type) | | object *find_arrow(object *op, const char *type) |
{ | | { |
object *tmp = NULL; | | object *tmp = NULL; |
| | |
| | |
* the hall. Failing that it does it's best to pick the highest plus arrow. | | * the hall. Failing that it does it's best to pick the highest plus arrow. |
*/ | | */ |
| | |
object *find_better_arrow(object *op, object *target, char *type, int *better) | | object *find_better_arrow(object *op, object *target, const char *type, int *better) |
{ | | { |
object *tmp = NULL, *arrow, *ntmp; | | object *tmp = NULL, *arrow, *ntmp; |
int attacknum, attacktype, betterby=0, i; | | int attacknum, attacktype, betterby=0, i; |
| | |
* dir = fire direction | | * dir = fire direction |
*/ | | */ |
| | |
object *pick_arrow_target(object *op, char *type, int dir) | | object *pick_arrow_target(object *op, const char *type, int dir) |
{ | | { |
object *tmp = NULL; | | object *tmp = NULL; |
mapstruct *m; | | mapstruct *m; |
| | |
{ | | { |
/* determine_god() seems to not work sometimes... why is this? | | /* determine_god() seems to not work sometimes... why is this? |
Should I be using something else? GD */ | | Should I be using something else? GD */ |
char *god = determine_god(op); | | const char *god = determine_god(op); |
if (god && (strcmp(god, "none"))) | | if (god && (strcmp(god, "none"))) |
new_draw_info_format(NDI_UNIQUE, 0, op, "For a brief " | | new_draw_info_format(NDI_UNIQUE, 0, op, "For a brief " |
"moment you feel the holy presence of %s protecting" | | "moment you feel the holy presence of %s protecting" |