version 1.57 | | version 1.58 |
---|
| | |
/* | | /* |
* static char *rcsid_player_c = | | * static char *rcsid_player_c = |
* "$Id: player.c,v 1.57 2001/05/29 04:41:54 mwedel Exp $"; | | * "$Id: player.c,v 1.58 2001/06/04 06:41:02 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
strncpy(p->title,op->arch->clone.name,MAX_NAME); | | strncpy(p->title,op->arch->clone.name,MAX_NAME); |
op->race = add_string (op->arch->clone.race); | | op->race = add_string (op->arch->clone.race); |
| | |
(void)memset((void *)op->contr->drawn,'\0', | | (void)memset((void *)op->contr->drawn,0, |
sizeof(Fontindex)*(WINRIGHT-WINLEFT+1)*(WINLOWER-WINUPPER+1)); | | sizeof(New_Face)* MAP_CLIENT_X * MAP_CLIENT_Y); |
| | |
for(i=0;i<NROFREALSPELLS;i++) | | for(i=0;i<NROFREALSPELLS;i++) |
p->known_spells[i]= -1; | | p->known_spells[i]= -1; |
p->nrofknownspells=0; | | p->nrofknownspells=0; |
| | |
* a blocked los square. */ | | * a blocked los square. */ |
if(op->head) { op = op->head; } | | if(op->head) { op = op->head; } |
while(op) { | | while(op) { |
if(pl->y + WINUPPER <= op->y && pl->y + WINLOWER >= op->y | | if(pl->y - MAP_CLIENT_Y/2 <= op->y && |
&& pl->x + WINLEFT <= op->x && pl->x + WINRIGHT >= op->x | | pl->y + MAP_CLIENT_Y/2 >= op->y && |
&& !pl->contr->blocked_los[op->x-pl->x+5][op->y-pl->y+5] ) | | pl->x - MAP_CLIENT_X/2 <= op->x && |
| | pl->x + MAP_CLIENT_X/2 >= op->x && |
| | !pl->contr->blocked_los[op->x-pl->x+MAP_CLIENT_X/2][op->y-pl->y+MAP_CLIENT_Y/2] ) |
return 1; | | return 1; |
op = op->more; | | op = op->more; |
} | | } |