version 1.14 | | version 1.15 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: request.c,v 1.14 2001/06/08 06:21:34 mwedel Exp $"; | | * "$Id: request.c,v 1.15 2001/06/12 04:29:44 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
mask = (ax & 0x3f) << 10 | (ay & 0x3f) << 4; | | mask = (ax & 0x3f) << 10 | (ay & 0x3f) << 4; |
SockList_AddShort(&sl, mask); | | SockList_AddShort(&sl, mask); |
pl->contr->socket.lastmap.cells[ax][ay].count=-1; | | pl->contr->socket.lastmap.cells[ax][ay].count=-1; |
#if 0 | | |
pl->contr->socket.lastmap.cells[ax][ay].faces[0] = blank_face->number; | | |
pl->contr->socket.lastmap.cells[ax][ay].faces[1] = blank_face->number; | | |
pl->contr->socket.lastmap.cells[ax][ay].faces[2] = blank_face->number; | | |
#else | | |
pl->contr->socket.lastmap.cells[ax][ay].faces[0] = 0; | | pl->contr->socket.lastmap.cells[ax][ay].faces[0] = 0; |
pl->contr->socket.lastmap.cells[ax][ay].faces[1] = 0; | | pl->contr->socket.lastmap.cells[ax][ay].faces[1] = 0; |
pl->contr->socket.lastmap.cells[ax][ay].faces[2] = 0; | | pl->contr->socket.lastmap.cells[ax][ay].faces[2] = 0; |
#endif | | |
} | | } |
} | | } |
else { /* this space is viewable */ | | else { /* this space is viewable */ |
| | |
(dx,dy), newmap[x][y] = oldmap[x-dx][y-dy] */ | | (dx,dy), newmap[x][y] = oldmap[x-dx][y-dy] */ |
for(x=0;x<ns->mapx;x++) { | | for(x=0;x<ns->mapx;x++) { |
for(y=0;y<ns->mapy;y++) { | | for(y=0;y<ns->mapy;y++) { |
newmap.cells[x][y].count = 0; | | if (x+dx < 0 || x+dx >= ns->mapx || y+dy < 0 || y+dy >= ns->mapy) { |
if (x+dx < 0 || x+dx >= ns->mapx) | | memset(&(newmap.cells[x][y]), 0, sizeof(struct MapCell)); |
continue; | | |
if (y+dy < 0 || y+dy >= ns->mapy) | | |
continue; | | continue; |
| | } |
memcpy(&(newmap.cells[x][y]), | | memcpy(&(newmap.cells[x][y]), |
&(ns->lastmap.cells[x+dx][y+dy]),sizeof(struct MapCell)); | | &(ns->lastmap.cells[x+dx][y+dy]),sizeof(struct MapCell)); |
} | | } |