version 1.45 | | version 1.46 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: request.c,v 1.45 2003/01/02 06:31:10 mwedel Exp $"; | | * "$Id: request.c,v 1.46 2003/03/03 05:13:08 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
void draw_client_map(object *pl) | | void draw_client_map(object *pl) |
{ | | { |
int i,j,ax,ay,nx,ny; /* ax and ay goes from 0 to max-size of arrays */ | | int i,j,nx,ny; /* ax and ay goes from 0 to max-size of arrays */ |
| | sint16 ax, ay; |
New_Face *face,*floor; | | New_Face *face,*floor; |
New_Face *floor2; | | New_Face *floor2; |
int d; | | int d, mflags; |
struct Map newmap; | | struct Map newmap; |
mapstruct *m; | | mapstruct *m; |
| | |
| | |
for(i = (pl->x - pl->contr->socket.mapx/2) ; i < (pl->x + (pl->contr->socket.mapx+1)/2); i++) { | | for(i = (pl->x - pl->contr->socket.mapx/2) ; i < (pl->x + (pl->contr->socket.mapx+1)/2); i++) { |
ax=i; | | ax=i; |
ay=j; | | ay=j; |
m = get_map_from_coord(pl->map, &ax, &ay); | | m = pl->map; |
if (m && (GET_MAP_FLAGS(m,ax,ay) & P_NEED_UPDATE)) | | mflags = get_map_flags(m, &m, ax, ay, &ax, &ay); |
| | if (mflags & P_NEED_UPDATE) |
update_position(m, ax, ay); | | update_position(m, ax, ay); |
| | /* If a map is visible to the player, we don't want to swap it out |
| | * just to reload it. This should really call something like |
| | * swap_map, but this is much more efficient and 'good enough' |
| | */ |
| | if (mflags & P_NEW_MAP) |
| | m->timeout = 50; |
} | | } |
} | | } |
/* do LOS after calls to update_position */ | | /* do LOS after calls to update_position */ |